dash-echartsx 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dash_echartsx/DashEChartsX.py +162 -0
- dash_echartsx/DashEChartsX.pyi +88 -0
- dash_echartsx/__init__.py +22 -0
- dash_echartsx/_imports_.py +5 -0
- dash_echartsx/dash_echartsx.es.js +30719 -0
- dash_echartsx/dash_echartsx.gl.umd.js +4217 -0
- dash_echartsx/dash_echartsx.gl.umd.js.map +1 -0
- dash_echartsx/dash_echartsx.umd.js +23 -0
- dash_echartsx/metadata.json +194 -0
- dash_echartsx/package.json +53 -0
- dash_echartsx/proptypes.js +26 -0
- dash_echartsx/utils.py +11 -0
- dash_echartsx-0.1.0.dist-info/METADATA +451 -0
- dash_echartsx-0.1.0.dist-info/RECORD +17 -0
- dash_echartsx-0.1.0.dist-info/WHEEL +4 -0
- dash_echartsx-0.1.0.dist-info/licenses/LICENSE +201 -0
- dash_echartsx-0.1.0.dist-info/licenses/NOTICE +13 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
# AUTO GENERATED FILE - DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
import typing # noqa: F401
|
|
4
|
+
from typing_extensions import TypedDict, NotRequired, Literal # noqa: F401
|
|
5
|
+
from dash.development.base_component import Component, _explicitize_args
|
|
6
|
+
try:
|
|
7
|
+
from dash.types import NumberType # noqa: F401
|
|
8
|
+
except ImportError:
|
|
9
|
+
# Backwards compatibility for dash<=4.1.0
|
|
10
|
+
if typing.TYPE_CHECKING:
|
|
11
|
+
raise
|
|
12
|
+
NumberType = typing.Union[ # noqa: F401
|
|
13
|
+
typing.SupportsFloat, typing.SupportsInt, typing.SupportsComplex
|
|
14
|
+
]
|
|
15
|
+
|
|
16
|
+
ComponentSingleType = typing.Union[str, int, float, Component, None]
|
|
17
|
+
ComponentType = typing.Union[
|
|
18
|
+
ComponentSingleType,
|
|
19
|
+
typing.Sequence[ComponentSingleType],
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DashEChartsX(Component):
|
|
24
|
+
"""A DashEChartsX component.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
Keyword arguments:
|
|
28
|
+
|
|
29
|
+
- id (string; optional):
|
|
30
|
+
Unique identifier for the component. Defaults to None when
|
|
31
|
+
omitted.
|
|
32
|
+
|
|
33
|
+
- append_data (dict; optional):
|
|
34
|
+
Append a batch of data to an ECharts series without resending its
|
|
35
|
+
full option. Defaults to None when omitted.
|
|
36
|
+
|
|
37
|
+
`append_data` is a dict with keys:
|
|
38
|
+
|
|
39
|
+
- seriesIndex (number; required)
|
|
40
|
+
|
|
41
|
+
- data (boolean | number | string | dict | list; required)
|
|
42
|
+
|
|
43
|
+
- className (string; optional):
|
|
44
|
+
CSS class applied to the component container. Defaults to None
|
|
45
|
+
when omitted.
|
|
46
|
+
|
|
47
|
+
- click_data (boolean | number | string | dict | list; optional):
|
|
48
|
+
Latest click event with seriesIndex, dataIndex, name, and value
|
|
49
|
+
when available. Defaults to None when omitted.
|
|
50
|
+
|
|
51
|
+
- dblclick_data (boolean | number | string | dict | list; optional):
|
|
52
|
+
Latest double-click event with seriesIndex, dataIndex, name, and
|
|
53
|
+
value when available. Defaults to None when omitted.
|
|
54
|
+
|
|
55
|
+
- dispatch_action (boolean | number | string | dict | list; optional):
|
|
56
|
+
Dispatch a supported ECharts action when this payload changes.
|
|
57
|
+
Defaults to None when omitted.
|
|
58
|
+
|
|
59
|
+
- enable_gl (boolean; optional):
|
|
60
|
+
Lazily load ECharts-GL before applying 3D/WebGL options. Defaults
|
|
61
|
+
to False.
|
|
62
|
+
|
|
63
|
+
- gl_bundle_url (string; optional):
|
|
64
|
+
Optional URL override for the separately served ECharts-GL bundle.
|
|
65
|
+
Defaults to None when omitted.
|
|
66
|
+
|
|
67
|
+
- hover_data (boolean | number | string | dict | list; optional):
|
|
68
|
+
Latest pointer-over event with seriesIndex, dataIndex, name, and
|
|
69
|
+
value when available. Defaults to None when omitted.
|
|
70
|
+
|
|
71
|
+
- key (string | number; optional)
|
|
72
|
+
|
|
73
|
+
- lazyUpdate (boolean; optional):
|
|
74
|
+
Defer option updates until the next animation frame. Defaults to
|
|
75
|
+
False.
|
|
76
|
+
|
|
77
|
+
- legend_status (boolean | number | string | dict | list; optional):
|
|
78
|
+
Latest legend selection event with the legend name and selection
|
|
79
|
+
state. Defaults to None when omitted.
|
|
80
|
+
|
|
81
|
+
- maps (boolean | number | string | dict | list; optional):
|
|
82
|
+
GeoJSON or SVG map definitions registered before applying the
|
|
83
|
+
option. Defaults to None when omitted.
|
|
84
|
+
|
|
85
|
+
- notMerge (boolean; optional):
|
|
86
|
+
Replace the current option instead of merging it. Defaults to
|
|
87
|
+
False.
|
|
88
|
+
|
|
89
|
+
- option (boolean | number | string | dict | list; optional):
|
|
90
|
+
ECharts option object. Defaults to None when omitted.
|
|
91
|
+
|
|
92
|
+
- ref (string; optional):
|
|
93
|
+
Allows getting a ref to the component instance. Once the component
|
|
94
|
+
unmounts, React will set `ref.current` to `None` (or call the ref
|
|
95
|
+
with `None` if you passed a callback ref). @,see,,{@link
|
|
96
|
+
,https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
|
|
97
|
+
React Docs,}.
|
|
98
|
+
|
|
99
|
+
- renderer (a value equal to: None, 'canvas', 'svg'; optional):
|
|
100
|
+
Rendering engine used by ECharts. Defaults to \"canvas\".
|
|
101
|
+
|
|
102
|
+
- selected_data (boolean | number | string | dict | list; optional):
|
|
103
|
+
Latest selection-change event, including the selected series and
|
|
104
|
+
data indexes. Defaults to None when omitted.
|
|
105
|
+
|
|
106
|
+
- theme (dict; optional):
|
|
107
|
+
Named light/dark theme or a custom ECharts theme object. Defaults
|
|
108
|
+
to None when omitted.
|
|
109
|
+
|
|
110
|
+
- zoom_data (boolean | number | string | dict | list; optional):
|
|
111
|
+
Latest data-zoom event with range and value bounds when available.
|
|
112
|
+
Defaults to None when omitted."""
|
|
113
|
+
_children_props: typing.List[str] = []
|
|
114
|
+
_base_nodes = ['children']
|
|
115
|
+
_namespace = 'dash_echartsx'
|
|
116
|
+
_type = 'DashEChartsX'
|
|
117
|
+
AppendData = TypedDict(
|
|
118
|
+
"AppendData",
|
|
119
|
+
{
|
|
120
|
+
"seriesIndex": NumberType,
|
|
121
|
+
"data": typing.Any
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def __init__(
|
|
127
|
+
self,
|
|
128
|
+
id: typing.Optional[typing.Union[str, dict]] = None,
|
|
129
|
+
className: typing.Optional[typing.Union[str]] = None,
|
|
130
|
+
style: typing.Optional[typing.Any] = None,
|
|
131
|
+
option: typing.Optional[typing.Any] = None,
|
|
132
|
+
maps: typing.Optional[typing.Any] = None,
|
|
133
|
+
enable_gl: typing.Optional[typing.Union[bool]] = None,
|
|
134
|
+
gl_bundle_url: typing.Optional[typing.Union[str]] = None,
|
|
135
|
+
notMerge: typing.Optional[typing.Union[bool]] = None,
|
|
136
|
+
lazyUpdate: typing.Optional[typing.Union[bool]] = None,
|
|
137
|
+
renderer: typing.Optional[Literal[None, "canvas", "svg"]] = None,
|
|
138
|
+
theme: typing.Optional[typing.Union[dict, Literal["light"], Literal["dark"]]] = None,
|
|
139
|
+
click_data: typing.Optional[typing.Any] = None,
|
|
140
|
+
dblclick_data: typing.Optional[typing.Any] = None,
|
|
141
|
+
hover_data: typing.Optional[typing.Any] = None,
|
|
142
|
+
selected_data: typing.Optional[typing.Any] = None,
|
|
143
|
+
legend_status: typing.Optional[typing.Any] = None,
|
|
144
|
+
zoom_data: typing.Optional[typing.Any] = None,
|
|
145
|
+
dispatch_action: typing.Optional[typing.Any] = None,
|
|
146
|
+
append_data: typing.Optional[typing.Union["AppendData"]] = None,
|
|
147
|
+
ref: typing.Optional[typing.Union[str, typing.Any]] = None,
|
|
148
|
+
key: typing.Optional[typing.Union[str, NumberType]] = None,
|
|
149
|
+
**kwargs
|
|
150
|
+
):
|
|
151
|
+
self._prop_names = ['id', 'append_data', 'className', 'click_data', 'dblclick_data', 'dispatch_action', 'enable_gl', 'gl_bundle_url', 'hover_data', 'key', 'lazyUpdate', 'legend_status', 'maps', 'notMerge', 'option', 'ref', 'renderer', 'selected_data', 'style', 'theme', 'zoom_data']
|
|
152
|
+
self._valid_wildcard_attributes = []
|
|
153
|
+
self.available_properties = ['id', 'append_data', 'className', 'click_data', 'dblclick_data', 'dispatch_action', 'enable_gl', 'gl_bundle_url', 'hover_data', 'key', 'lazyUpdate', 'legend_status', 'maps', 'notMerge', 'option', 'ref', 'renderer', 'selected_data', 'style', 'theme', 'zoom_data']
|
|
154
|
+
self.available_wildcard_properties = []
|
|
155
|
+
_explicit_args = kwargs.pop('_explicit_args')
|
|
156
|
+
_locals = locals()
|
|
157
|
+
_locals.update(kwargs) # For wildcard attrs and excess named props
|
|
158
|
+
args = {k: _locals[k] for k in _explicit_args}
|
|
159
|
+
|
|
160
|
+
super(DashEChartsX, self).__init__(**args)
|
|
161
|
+
|
|
162
|
+
setattr(DashEChartsX, "__init__", _explicitize_args(DashEChartsX.__init__))
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Generated from component metadata; do not edit.
|
|
2
|
+
from collections.abc import Mapping, Sequence
|
|
3
|
+
from typing import Any, Literal
|
|
4
|
+
|
|
5
|
+
from dash.development.base_component import Component
|
|
6
|
+
from typing_extensions import NotRequired, TypedDict
|
|
7
|
+
|
|
8
|
+
class AppendData(TypedDict):
|
|
9
|
+
seriesIndex: int
|
|
10
|
+
data: Any
|
|
11
|
+
|
|
12
|
+
class MapDefinition(TypedDict):
|
|
13
|
+
name: str
|
|
14
|
+
geoJSON: Any
|
|
15
|
+
specialAreas: NotRequired[Mapping[str, Any]]
|
|
16
|
+
|
|
17
|
+
class DashEChartsX(Component):
|
|
18
|
+
"""Typed Dash wrapper for the Apache ECharts component."""
|
|
19
|
+
|
|
20
|
+
def __init__(
|
|
21
|
+
self,
|
|
22
|
+
id: str | Mapping[str, Any] | None = ...,
|
|
23
|
+
className: str | None = ...,
|
|
24
|
+
style: Mapping[str, Any] | None = ...,
|
|
25
|
+
option: Mapping[str, Any] | None = ...,
|
|
26
|
+
maps: Sequence[MapDefinition] | None = ...,
|
|
27
|
+
enable_gl: bool | None = ...,
|
|
28
|
+
gl_bundle_url: str | None = ...,
|
|
29
|
+
notMerge: bool | None = ...,
|
|
30
|
+
lazyUpdate: bool | None = ...,
|
|
31
|
+
renderer: Literal["canvas", "svg"] | None = ...,
|
|
32
|
+
theme: Literal["light", "dark"] | Mapping[str, Any] | None = ...,
|
|
33
|
+
click_data: Mapping[str, Any] | None = ...,
|
|
34
|
+
dblclick_data: Mapping[str, Any] | None = ...,
|
|
35
|
+
hover_data: Mapping[str, Any] | None = ...,
|
|
36
|
+
selected_data: Mapping[str, Any] | None = ...,
|
|
37
|
+
legend_status: Mapping[str, Any] | None = ...,
|
|
38
|
+
zoom_data: Mapping[str, Any] | None = ...,
|
|
39
|
+
dispatch_action: Mapping[str, Any] | None = ...,
|
|
40
|
+
append_data: AppendData | None = ...,
|
|
41
|
+
ref: Any = ...,
|
|
42
|
+
key: str | int | None = ...,
|
|
43
|
+
children: Any = ...,
|
|
44
|
+
**kwargs: Any,
|
|
45
|
+
) -> None:
|
|
46
|
+
"""Create an ECharts component.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
children: Child Dash components or text.
|
|
50
|
+
id: Unique identifier for the component. Defaults to None when omitted.
|
|
51
|
+
className: CSS class applied to the component container. Defaults to None
|
|
52
|
+
when omitted.
|
|
53
|
+
style: Inline styles applied to the component container. Defaults to None
|
|
54
|
+
when omitted.
|
|
55
|
+
option: ECharts option object. Defaults to None when omitted.
|
|
56
|
+
maps: GeoJSON or SVG map definitions registered before applying the option.
|
|
57
|
+
Defaults to None when omitted.
|
|
58
|
+
enable_gl: Lazily load ECharts-GL before applying 3D/WebGL options. Defaults
|
|
59
|
+
to false.
|
|
60
|
+
gl_bundle_url: Optional URL override for the separately served ECharts-GL
|
|
61
|
+
bundle. Defaults to None when omitted.
|
|
62
|
+
notMerge: Replace the current option instead of merging it. Defaults to
|
|
63
|
+
false.
|
|
64
|
+
lazyUpdate: Defer option updates until the next animation frame. Defaults to
|
|
65
|
+
false.
|
|
66
|
+
renderer: Rendering engine used by ECharts. Defaults to "canvas".
|
|
67
|
+
theme: Named light/dark theme or a custom ECharts theme object. Defaults to
|
|
68
|
+
None when omitted.
|
|
69
|
+
click_data: Latest click event with seriesIndex, dataIndex, name, and value
|
|
70
|
+
when available. Defaults to None when omitted.
|
|
71
|
+
dblclick_data: Latest double-click event with seriesIndex, dataIndex, name,
|
|
72
|
+
and value when available. Defaults to None when omitted.
|
|
73
|
+
hover_data: Latest pointer-over event with seriesIndex, dataIndex, name, and
|
|
74
|
+
value when available. Defaults to None when omitted.
|
|
75
|
+
selected_data: Latest selection-change event, including the selected series
|
|
76
|
+
and data indexes. Defaults to None when omitted.
|
|
77
|
+
legend_status: Latest legend selection event with the legend name and
|
|
78
|
+
selection state. Defaults to None when omitted.
|
|
79
|
+
zoom_data: Latest data-zoom event with range and value bounds when
|
|
80
|
+
available. Defaults to None when omitted.
|
|
81
|
+
dispatch_action: Dispatch a supported ECharts action when this payload
|
|
82
|
+
changes. Defaults to None when omitted.
|
|
83
|
+
append_data: Append a batch of data to an ECharts series without resending
|
|
84
|
+
its full option. Defaults to None when omitted.
|
|
85
|
+
ref: React component reference. Defaults to None when omitted.
|
|
86
|
+
key: React element key. Defaults to None when omitted.
|
|
87
|
+
kwargs: Additional Dash component properties.
|
|
88
|
+
"""
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
from .DashEChartsX import DashEChartsX
|
|
2
|
+
|
|
3
|
+
__version__ = "0.1.0"
|
|
4
|
+
|
|
5
|
+
_js_dist = [
|
|
6
|
+
{
|
|
7
|
+
"relative_package_path": "dash_echartsx.umd.js",
|
|
8
|
+
"namespace": "dash_echartsx",
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"relative_package_path": "dash_echartsx.gl.umd.js",
|
|
12
|
+
"namespace": "dash_echartsx",
|
|
13
|
+
"dynamic": True,
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"dev_package_path": "proptypes.js",
|
|
17
|
+
"namespace": "dash_echartsx",
|
|
18
|
+
"dev_only": True,
|
|
19
|
+
},
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
__all__ = ["DashEChartsX"]
|