|
@@ -1,15 +1,15 @@
|
|
|
-from nicegui import ui
|
|
|
-
|
|
|
from .. import optional_features
|
|
|
+from ..element import Element
|
|
|
from ..logging import log
|
|
|
+from .markdown import Markdown
|
|
|
|
|
|
try:
|
|
|
from nicegui_highcharts import highchart
|
|
|
optional_features.register('highcharts')
|
|
|
__all__ = ['highchart']
|
|
|
except ImportError:
|
|
|
- class highchart(ui.element): # type: ignore
|
|
|
- def __init__(self, *args, **kwargs) -> None:
|
|
|
+ class highchart(Element): # type: ignore
|
|
|
+ def __init__(self, *args, **kwargs) -> None: # pylint: disable=unused-argument
|
|
|
"""Highcharts chart
|
|
|
|
|
|
An element to create a chart using `Highcharts <https://www.highcharts.com/>`_.
|
|
@@ -21,5 +21,5 @@ except ImportError:
|
|
|
and can be installed with `pip install nicegui[highcharts]`.
|
|
|
"""
|
|
|
super().__init__()
|
|
|
- ui.markdown('Highcharts is not installed. Please run `pip install nicegui[highcharts]`.')
|
|
|
+ Markdown('Highcharts is not installed. Please run `pip install nicegui[highcharts]`.')
|
|
|
log.warning('Highcharts is not installed. Please run "pip install nicegui[highcharts]".')
|