@visactor/react-vchart 0.0.1-alpha.2 → 0.10.0-alpha.3
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.
- package/README.md +33 -5
- package/cjs/VChart.d.ts +4 -2
- package/cjs/VChart.js +11 -3
- package/cjs/VChart.js.map +1 -1
- package/cjs/VChartSimple.d.ts +6 -0
- package/cjs/VChartSimple.js +10 -0
- package/cjs/VChartSimple.js.map +1 -0
- package/cjs/charts/AreaChart.d.ts +7 -2
- package/cjs/charts/AreaChart.js +11 -2
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +7 -2
- package/cjs/charts/BarChart.js +11 -2
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +10 -6
- package/cjs/charts/BaseChart.js +57 -34
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +6 -1
- package/cjs/charts/BoxPlotChart.js +11 -2
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +6 -1
- package/cjs/charts/CircularProgressChart.js +11 -2
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +6 -1
- package/cjs/charts/CommonChart.js +11 -2
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +6 -1
- package/cjs/charts/FunnelChart.js +11 -2
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +6 -1
- package/cjs/charts/HistogramChart.js +11 -2
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +7 -2
- package/cjs/charts/LineChart.js +11 -2
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +6 -1
- package/cjs/charts/LinearProgressChart.js +11 -2
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +7 -2
- package/cjs/charts/MapChart.js +11 -2
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +7 -2
- package/cjs/charts/PieChart.js +11 -2
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +7 -2
- package/cjs/charts/RadarChart.js +11 -2
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +7 -2
- package/cjs/charts/RangeColumnChart.js +11 -2
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +7 -2
- package/cjs/charts/RoseChart.js +11 -3
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +7 -2
- package/cjs/charts/ScatterChart.js +12 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +7 -2
- package/cjs/charts/SequenceChart.js +11 -2
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +7 -2
- package/cjs/charts/WordCloudChart.js +11 -2
- package/cjs/charts/WordCloudChart.js.map +1 -1
- package/cjs/charts/index.d.ts +18 -16
- package/cjs/charts/index.js +24 -146
- package/cjs/charts/index.js.map +1 -1
- package/cjs/components/Axis.d.ts +4 -5
- package/cjs/components/Axis.js.map +1 -1
- package/cjs/components/BaseComponent.d.ts +2 -1
- package/cjs/components/BaseComponent.js +14 -35
- package/cjs/components/BaseComponent.js.map +1 -1
- package/cjs/components/Brush.d.ts +5 -0
- package/cjs/components/Brush.js +10 -0
- package/cjs/components/Brush.js.map +1 -0
- package/cjs/components/Crosshair.d.ts +4 -0
- package/cjs/components/Crosshair.js +10 -0
- package/cjs/components/Crosshair.js.map +1 -0
- package/cjs/components/DataZoom.d.ts +5 -0
- package/cjs/components/DataZoom.js +10 -0
- package/cjs/components/DataZoom.js.map +1 -0
- package/cjs/components/Indicator.d.ts +4 -0
- package/cjs/components/Indicator.js +10 -0
- package/cjs/components/Indicator.js.map +1 -0
- package/cjs/components/Legend.d.ts +4 -8
- package/cjs/components/Legend.js.map +1 -1
- package/cjs/components/Mark.d.ts +4 -14
- package/cjs/components/Mark.js +2 -60
- package/cjs/components/Mark.js.map +1 -1
- package/cjs/components/MarkArea.d.ts +4 -0
- package/cjs/components/MarkArea.js +10 -0
- package/cjs/components/MarkArea.js.map +1 -0
- package/cjs/components/MarkLine.d.ts +4 -0
- package/cjs/components/MarkLine.js +10 -0
- package/cjs/components/MarkLine.js.map +1 -0
- package/cjs/components/MarkPoint.d.ts +4 -0
- package/cjs/components/MarkPoint.js +10 -0
- package/cjs/components/MarkPoint.js.map +1 -0
- package/cjs/components/Player.d.ts +5 -0
- package/cjs/components/Player.js +10 -0
- package/cjs/components/Player.js.map +1 -0
- package/cjs/components/Region.d.ts +4 -4
- package/cjs/components/Region.js +1 -2
- package/cjs/components/Region.js.map +1 -1
- package/cjs/components/ScrollBar.d.ts +5 -0
- package/cjs/components/ScrollBar.js +10 -0
- package/cjs/components/ScrollBar.js.map +1 -0
- package/cjs/components/Title.d.ts +4 -0
- package/cjs/components/Title.js +10 -0
- package/cjs/components/Title.js.map +1 -0
- package/cjs/components/Tooltip.d.ts +4 -0
- package/cjs/components/Tooltip.js +10 -0
- package/cjs/components/Tooltip.js.map +1 -0
- package/cjs/components/index.d.ts +11 -0
- package/cjs/components/index.js +8 -2
- package/cjs/components/index.js.map +1 -1
- package/cjs/constants.js +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/containers/withContainer.d.ts +2 -2
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/chart.d.ts +2 -3
- package/cjs/context/chart.js.map +1 -1
- package/cjs/context/stage.d.ts +2 -2
- package/cjs/context/stage.js.map +1 -1
- package/cjs/context/view.d.ts +2 -2
- package/cjs/context/view.js.map +1 -1
- package/cjs/eventsUtils.d.ts +148 -47
- package/cjs/eventsUtils.js +35 -5
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +4 -19
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +6 -5
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +6 -5
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.d.ts +2 -1
- package/cjs/series/BaseSeries.js +22 -49
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +6 -5
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +6 -5
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +6 -5
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +6 -5
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +6 -5
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +6 -5
- package/cjs/series/LinearProgress.js +1 -2
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +6 -5
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +6 -5
- package/cjs/series/Map.js +2 -1
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +6 -5
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +6 -5
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +6 -5
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +6 -5
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +6 -5
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +6 -6
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +6 -5
- package/cjs/series/WordCloud.js +1 -1
- package/cjs/series/WordCloud.js.map +1 -1
- package/cjs/series/index.js +1 -1
- package/cjs/series/index.js.map +1 -1
- package/cjs/util.js +1 -1
- package/cjs/util.js.map +1 -1
- package/esm/VChart.d.ts +4 -2
- package/esm/VChart.js +7 -1
- package/esm/VChart.js.map +1 -1
- package/esm/VChartSimple.d.ts +6 -0
- package/esm/VChartSimple.js +4 -0
- package/esm/VChartSimple.js.map +1 -0
- package/esm/charts/AreaChart.d.ts +7 -2
- package/esm/charts/AreaChart.js +6 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +7 -2
- package/esm/charts/BarChart.js +6 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +10 -6
- package/esm/charts/BaseChart.js +56 -35
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +6 -1
- package/esm/charts/BoxPlotChart.js +6 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +6 -1
- package/esm/charts/CircularProgressChart.js +6 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +6 -1
- package/esm/charts/CommonChart.js +6 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +6 -1
- package/esm/charts/FunnelChart.js +6 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +6 -1
- package/esm/charts/HistogramChart.js +6 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +7 -2
- package/esm/charts/LineChart.js +6 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +6 -1
- package/esm/charts/LinearProgressChart.js +6 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +7 -2
- package/esm/charts/MapChart.js +6 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +7 -2
- package/esm/charts/PieChart.js +6 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +7 -2
- package/esm/charts/RadarChart.js +6 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +7 -2
- package/esm/charts/RangeColumnChart.js +6 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +7 -2
- package/esm/charts/RoseChart.js +6 -2
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +7 -2
- package/esm/charts/ScatterChart.js +7 -1
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +7 -2
- package/esm/charts/SequenceChart.js +6 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +7 -2
- package/esm/charts/WordCloudChart.js +6 -1
- package/esm/charts/WordCloudChart.js.map +1 -1
- package/esm/charts/index.d.ts +18 -16
- package/esm/charts/index.js +17 -17
- package/esm/charts/index.js.map +1 -1
- package/esm/components/Axis.d.ts +4 -5
- package/esm/components/Axis.js.map +1 -1
- package/esm/components/BaseComponent.d.ts +2 -1
- package/esm/components/BaseComponent.js +14 -35
- package/esm/components/BaseComponent.js.map +1 -1
- package/esm/components/Brush.d.ts +5 -0
- package/esm/components/Brush.js +6 -0
- package/esm/components/Brush.js.map +1 -0
- package/esm/components/Crosshair.d.ts +4 -0
- package/esm/components/Crosshair.js +4 -0
- package/esm/components/Crosshair.js.map +1 -0
- package/esm/components/DataZoom.d.ts +5 -0
- package/esm/components/DataZoom.js +6 -0
- package/esm/components/DataZoom.js.map +1 -0
- package/esm/components/Indicator.d.ts +4 -0
- package/esm/components/Indicator.js +4 -0
- package/esm/components/Indicator.js.map +1 -0
- package/esm/components/Legend.d.ts +4 -8
- package/esm/components/Legend.js.map +1 -1
- package/esm/components/Mark.d.ts +4 -14
- package/esm/components/Mark.js +2 -38
- package/esm/components/Mark.js.map +1 -1
- package/esm/components/MarkArea.d.ts +4 -0
- package/esm/components/MarkArea.js +4 -0
- package/esm/components/MarkArea.js.map +1 -0
- package/esm/components/MarkLine.d.ts +4 -0
- package/esm/components/MarkLine.js +4 -0
- package/esm/components/MarkLine.js.map +1 -0
- package/esm/components/MarkPoint.d.ts +4 -0
- package/esm/components/MarkPoint.js +4 -0
- package/esm/components/MarkPoint.js.map +1 -0
- package/esm/components/Player.d.ts +5 -0
- package/esm/components/Player.js +6 -0
- package/esm/components/Player.js.map +1 -0
- package/esm/components/Region.d.ts +4 -4
- package/esm/components/Region.js +1 -2
- package/esm/components/Region.js.map +1 -1
- package/esm/components/ScrollBar.d.ts +5 -0
- package/esm/components/ScrollBar.js +6 -0
- package/esm/components/ScrollBar.js.map +1 -0
- package/esm/components/Title.d.ts +4 -0
- package/esm/components/Title.js +4 -0
- package/esm/components/Title.js.map +1 -0
- package/esm/components/Tooltip.d.ts +4 -0
- package/esm/components/Tooltip.js +4 -0
- package/esm/components/Tooltip.js.map +1 -0
- package/esm/components/index.d.ts +11 -0
- package/esm/components/index.js +23 -1
- package/esm/components/index.js.map +1 -1
- package/esm/constants.js +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/containers/withContainer.d.ts +2 -2
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/chart.d.ts +2 -3
- package/esm/context/chart.js.map +1 -1
- package/esm/context/stage.d.ts +2 -2
- package/esm/context/stage.js.map +1 -1
- package/esm/context/view.d.ts +2 -2
- package/esm/context/view.js.map +1 -1
- package/esm/eventsUtils.d.ts +148 -47
- package/esm/eventsUtils.js +48 -4
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +4 -3
- package/esm/index.js +4 -3
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +6 -5
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +6 -5
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.d.ts +2 -1
- package/esm/series/BaseSeries.js +22 -50
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +6 -5
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +6 -5
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +6 -5
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +6 -5
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +6 -5
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +6 -5
- package/esm/series/LinearProgress.js +1 -2
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +6 -5
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +6 -5
- package/esm/series/Map.js +2 -1
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +6 -5
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +6 -5
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +6 -5
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +6 -5
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +6 -5
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +6 -6
- package/esm/series/Series.js +1 -1
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +6 -5
- package/esm/series/WordCloud.js +1 -1
- package/esm/series/WordCloud.js.map +1 -1
- package/esm/series/index.js +1 -1
- package/esm/series/index.js.map +1 -1
- package/esm/util.js +1 -1
- package/esm/util.js.map +1 -1
- package/package.json +11 -9
package/esm/eventsUtils.js
CHANGED
|
@@ -49,10 +49,54 @@ export const REACT_TO_VCHART_EVENTS = {
|
|
|
49
49
|
export const LEGEND_CUSTOMIZED_EVENTS = {
|
|
50
50
|
onLegendItemHover: "legendItemHover",
|
|
51
51
|
onLegendItemUnHover: "legendItemUnHover",
|
|
52
|
-
onLegendItemClick: "legendItemClick"
|
|
52
|
+
onLegendItemClick: "legendItemClick",
|
|
53
|
+
onLegendFilter: "legendFilter",
|
|
54
|
+
onLegendSelectedDataChange: "legendSelectedDataChange"
|
|
53
55
|
};
|
|
54
56
|
|
|
55
|
-
export const
|
|
57
|
+
export const BRUSH_CUSTOMIZED_EVENTS = {
|
|
58
|
+
onBrushStart: "brushStart",
|
|
59
|
+
onBrushChange: "brushChange",
|
|
60
|
+
onBrushEnd: "brushEnd",
|
|
61
|
+
onBrushClear: "brushClear"
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const DATAZOOM_CUSTOMIZED_EVENTS = {
|
|
65
|
+
onDataZoomChange: "dataZoomChange"
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const PLAYER_CUSTOMIZED_EVENTS = {
|
|
69
|
+
onPlayerPlay: "playerPlay",
|
|
70
|
+
onPlayerPause: "playerPause",
|
|
71
|
+
onPlayerEnd: "playerEnd",
|
|
72
|
+
onPlayerChange: "playerChange",
|
|
73
|
+
onPlayerForward: "playerForward",
|
|
74
|
+
onPlayerBackward: "playerBackward"
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const SCROLLBAR_CUSTOMIZED_EVENTS = {
|
|
78
|
+
onScrollBarChange: "scrollBarChange"
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const DIMENSION_EVENTS = {
|
|
82
|
+
onDimensionHover: "dimensionHover",
|
|
83
|
+
onDimensionClick: "dimensionClick"
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const HIERARCHY_EVENTS = {
|
|
87
|
+
onDrill: "drill"
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const CHART_LIFECYCLE_EVENTS = {
|
|
91
|
+
onInitialized: "initialized",
|
|
92
|
+
onRendered: "rendered",
|
|
93
|
+
onRenderFinished: "renderFinished",
|
|
94
|
+
onAnimationFinished: "animationFinished",
|
|
95
|
+
onLayoutStart: "layoutStart",
|
|
96
|
+
onLayoutEnd: "layoutEnd"
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export const CHART_EVENTS = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, LEGEND_CUSTOMIZED_EVENTS), BRUSH_CUSTOMIZED_EVENTS), PLAYER_CUSTOMIZED_EVENTS), DATAZOOM_CUSTOMIZED_EVENTS), SCROLLBAR_CUSTOMIZED_EVENTS), DIMENSION_EVENTS), CHART_LIFECYCLE_EVENTS), HIERARCHY_EVENTS), REACT_TO_VCHART_EVENTS);
|
|
56
100
|
|
|
57
101
|
export const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);
|
|
58
102
|
|
|
@@ -64,7 +108,7 @@ res)), {});
|
|
|
64
108
|
export const findEventProps = (props, supportedEvents = REACT_TO_VCHART_EVENTS) => {
|
|
65
109
|
const result = {};
|
|
66
110
|
return Object.keys(props).forEach((key => {
|
|
67
|
-
supportedEvents[key] && (result[key] = props[key]);
|
|
111
|
+
supportedEvents[key] && props[key] && (result[key] = props[key]);
|
|
68
112
|
})), result;
|
|
69
113
|
};
|
|
70
114
|
|
|
@@ -79,4 +123,4 @@ export const bindEventsToChart = (chart, newProps, prevProps, supportedEvents =
|
|
|
79
123
|
prevEventProps && prevEventProps[eventKey] && prevEventProps[eventKey] === newEventProps[eventKey] || chart.on(supportedEvents[eventKey], newEventProps[eventKey]);
|
|
80
124
|
})), !0;
|
|
81
125
|
};
|
|
82
|
-
//# sourceMappingURL=eventsUtils.js.map
|
|
126
|
+
//# sourceMappingURL=eventsUtils.js.map
|
package/esm/eventsUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["eventsUtils.ts"],"names":[],"mappings":"AAkDA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;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AC;IAElF,IAAI,cAAc,EAAE;QAClB,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC7C,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAK,cAAc,CAAC,QAAQ,CAAC,EAAE;gBACtG,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC;aACvE;QACH,CAAC,CAAC,CAAC;KACJ;IAED,IAAI,aAAa,EAAE;QACjB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC5C,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,aAAa,CAAC,QAAQ,CAAC,EAAE;gBACxG,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;aAC9D;QACH,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"eventsUtils.js","sourcesContent":["import type VChart from '@visactor/vchart';\n\nexport interface EventsProps {\n onPointerDown?: (e: any) => void | boolean;\n onPointerUp?: (e: any) => void | boolean;\n onPointerUpOutside?: (e: any) => void | boolean;\n onPointerTap?: (e: any) => void | boolean;\n onPointerOver?: (e: any) => void | boolean;\n onPointerMove?: (e: any) => void | boolean;\n onPointerEnter?: (e: any) => void | boolean;\n onPointerLeave?: (e: any) => void | boolean;\n onPointerOut?: (e: any) => void | boolean;\n onMouseDown?: (e: any) => void | boolean;\n onMouseUp?: (e: any) => void | boolean;\n onMouseUpOutside?: (e: any) => void | boolean;\n onMouseMove?: (e: any) => void | boolean;\n onMouseOver?: (e: any) => void | boolean;\n onMouseOut?: (e: any) => void | boolean;\n onMouseEnter?: (e: any) => void | boolean;\n onMouseLeave?: (e: any) => void | boolean;\n onPinch?: (e: any) => void | boolean;\n onPinchStart?: (e: any) => void | boolean;\n onPinchEnd?: (e: any) => void | boolean;\n onPan?: (e: any) => void | boolean;\n onPanStart?: (e: any) => void | boolean;\n onPanEnd?: (e: any) => void | boolean;\n onDrag?: (e: any) => void | boolean;\n onDragStart?: (e: any) => void | boolean;\n onDragEnter?: (e: any) => void | boolean;\n onDragLeave?: (e: any) => void | boolean;\n onDragOver?: (e: any) => void | boolean;\n onDragEnd?: (e: any) => void | boolean;\n onRightDown?: (e: any) => void | boolean;\n onRightUp?: (e: any) => void | boolean;\n onRightUpOutside?: (e: any) => void | boolean;\n onTouchStart?: (e: any) => void | boolean;\n onTouchEnd?: (e: any) => void | boolean;\n onTouchEndOutside?: (e: any) => void | boolean;\n onTouchMove?: (e: any) => void | boolean;\n onTouchCancel?: (e: any) => void | boolean;\n onPress?: (e: any) => void | boolean;\n onPressUp?: (e: any) => void | boolean;\n onPressEnd?: (e: any) => void | boolean;\n onSwipe?: (e: any) => void | boolean;\n onDrop?: (e: any) => void | boolean;\n onWeel?: (e: any) => void | boolean;\n onClick?: (e: any) => void | boolean;\n onDblClick?: (e: any) => void | boolean;\n}\n\nexport const REACT_TO_VCHART_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const LEGEND_CUSTOMIZED_EVENTS = {\n onLegendItemHover: 'legendItemHover',\n onLegendItemUnHover: 'legendItemUnHover',\n onLegendItemClick: 'legendItemClick'\n};\n\nexport const CHART_EVENTS = {\n ...LEGEND_CUSTOMIZED_EVENTS,\n ...REACT_TO_VCHART_EVENTS\n};\n\nexport const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);\n\nexport const COMMON_EVENTK_KEYS = Object.keys(REACT_TO_VCHART_EVENTS);\n\nexport const VCHART_TO_REACT_EVENTS = Object.keys(REACT_TO_VCHART_EVENTS).reduce((res, key) => {\n res[REACT_TO_VCHART_EVENTS[key]] = key;\n\n return res;\n}, {});\n\nexport const findEventProps = <T extends EventsProps>(\n props: T,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n): EventsProps => {\n const result: EventsProps = {};\n\n Object.keys(props).forEach(key => {\n if (supportedEvents[key]) {\n result[key] = props[key];\n }\n });\n\n return result;\n};\n\nexport const bindEventsToChart = <T>(\n chart: VChart,\n newProps?: T | null,\n prevProps?: T | null,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n) => {\n if ((!newProps && !prevProps) || !chart) {\n return false;\n }\n\n const prevEventProps = prevProps ? findEventProps(prevProps, supportedEvents) : null;\n const newEventProps = newProps ? findEventProps(newProps, supportedEvents) : null;\n\n if (prevEventProps) {\n Object.keys(prevEventProps).forEach(eventKey => {\n if (!newEventProps || !newEventProps[eventKey] || newEventProps[eventKey] !== prevEventProps[eventKey]) {\n const res = chart.off(supportedEvents[eventKey], prevProps[eventKey]);\n }\n });\n }\n\n if (newEventProps) {\n Object.keys(newEventProps).forEach(eventKey => {\n if (!prevEventProps || !prevEventProps[eventKey] || prevEventProps[eventKey] !== newEventProps[eventKey]) {\n chart.on(supportedEvents[eventKey], newEventProps[eventKey]);\n }\n });\n }\n\n return true;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/eventsUtils.ts"],"names":[],"mappings":"AAmGA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,UAAU;IACtB,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,SAAS;IACpB,WAAW,EA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CAAC;KACJ;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"eventsUtils.js","sourcesContent":["import type { IVChart, EventCallback, EventParamsDefinition } from '@visactor/vchart';\n\nexport interface LegendEventProps {\n onLegendItemHover?: (e: any) => void;\n onLegendItemUnHover?: (e: any) => void;\n onLegendItemClick?: (e: any) => void;\n onLegendFilter?: (e: any) => void;\n onLegendSelectedDataChange?: (e: any) => void;\n}\n\nexport interface BrushEventProps {\n onBrushStart?: (e: any) => void;\n onBrushChange?: (e: any) => void;\n onBrushEnd?: (e: any) => void;\n}\n\nexport interface DataZoomEventProps {\n onDataZoomChange?: (e: any) => void;\n}\n\nexport interface PlayerEventProps {\n onPlayerPlay?: (e: any) => void;\n onPlayerPause?: (e: any) => void;\n onPlayerEnd?: (e: any) => void;\n onPlayerChange?: (e: any) => void;\n onPlayerForward?: (e: any) => void;\n onPlayerBackward?: (e: any) => void;\n}\n\nexport interface ScrollBarEventProps {\n onScrollBarChange?: (e: any) => void;\n}\n\nexport interface DimensionEventProps {\n onDimensionHover?: (e: any) => void;\n onDimensionClick?: (e: any) => void;\n}\n\nexport interface HierarchyEventProps {\n onDrill?: (e: any) => void;\n}\n\nexport interface ChartLifeCycleEventProps {\n onInitialized?: (e: any) => void;\n onRendered?: (e: any) => void;\n onRenderFinished?: (e: any) => void;\n onAnimationFinished?: (e: any) => void;\n onLayoutStart?: (e: any) => void;\n onLayoutEnd?: (e: any) => void;\n}\n\nexport interface EventsProps {\n onPointerDown?: EventCallback<EventParamsDefinition['pointerdown']>;\n onPointerUp?: EventCallback<EventParamsDefinition['pointerup']>;\n onPointerUpOutside?: EventCallback<EventParamsDefinition['pointerupoutside']>;\n onPointerTap?: EventCallback<EventParamsDefinition['pointertap']>;\n onPointerOver?: EventCallback<EventParamsDefinition['pointerover']>;\n onPointerMove?: EventCallback<EventParamsDefinition['pointermove']>;\n onPointerEnter?: EventCallback<EventParamsDefinition['pointerenter']>;\n onPointerLeave?: EventCallback<EventParamsDefinition['pointerleave']>;\n onPointerOut?: EventCallback<EventParamsDefinition['pointerout']>;\n onMouseDown?: EventCallback<EventParamsDefinition['mousedown']>;\n onMouseUp?: EventCallback<EventParamsDefinition['mouseup']>;\n onMouseUpOutside?: EventCallback<EventParamsDefinition['mouseupoutside']>;\n onMouseMove?: EventCallback<EventParamsDefinition['mousemove']>;\n onMouseOver?: EventCallback<EventParamsDefinition['mouseover']>;\n onMouseOut?: EventCallback<EventParamsDefinition['mouseout']>;\n onMouseEnter?: EventCallback<EventParamsDefinition['mouseenter']>;\n onMouseLeave?: EventCallback<EventParamsDefinition['mouseleave']>;\n onPinch?: EventCallback<EventParamsDefinition['pinch']>;\n onPinchStart?: EventCallback<EventParamsDefinition['pinchstart']>;\n onPinchEnd?: EventCallback<EventParamsDefinition['pinchend']>;\n onPan?: EventCallback<EventParamsDefinition['pan']>;\n onPanStart?: EventCallback<EventParamsDefinition['panstart']>;\n onPanEnd?: EventCallback<EventParamsDefinition['panend']>;\n onDrag?: EventCallback<EventParamsDefinition['drag']>;\n onDragStart?: EventCallback<EventParamsDefinition['dragstart']>;\n onDragEnter?: EventCallback<EventParamsDefinition['dragenter']>;\n onDragLeave?: EventCallback<EventParamsDefinition['dragleave']>;\n onDragOver?: EventCallback<EventParamsDefinition['dragover']>;\n onDragEnd?: EventCallback<EventParamsDefinition['dragend']>;\n onRightDown?: EventCallback<EventParamsDefinition['rightdown']>;\n onRightUp?: EventCallback<EventParamsDefinition['rightup']>;\n onRightUpOutside?: EventCallback<EventParamsDefinition['rightupoutside']>;\n onTouchStart?: EventCallback<EventParamsDefinition['touchstart']>;\n onTouchEnd?: EventCallback<EventParamsDefinition['touchend']>;\n onTouchEndOutside?: EventCallback<EventParamsDefinition['touchendoutside']>;\n onTouchMove?: EventCallback<EventParamsDefinition['touchmove']>;\n onTouchCancel?: EventCallback<EventParamsDefinition['touchcancel']>;\n onPress?: EventCallback<EventParamsDefinition['press']>;\n onPressUp?: EventCallback<EventParamsDefinition['pressup']>;\n onPressEnd?: EventCallback<EventParamsDefinition['pressend']>;\n onSwipe?: EventCallback<EventParamsDefinition['swipe']>;\n onDrop?: EventCallback<EventParamsDefinition['drop']>;\n onWeel?: EventCallback<EventParamsDefinition['weel']>;\n onClick?: EventCallback<EventParamsDefinition['click']>;\n onDblClick?: EventCallback<EventParamsDefinition['dblclick']>;\n}\n\nexport const REACT_TO_VCHART_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const LEGEND_CUSTOMIZED_EVENTS = {\n onLegendItemHover: 'legendItemHover',\n onLegendItemUnHover: 'legendItemUnHover',\n onLegendItemClick: 'legendItemClick',\n onLegendFilter: 'legendFilter',\n onLegendSelectedDataChange: 'legendSelectedDataChange'\n};\nexport const BRUSH_CUSTOMIZED_EVENTS = {\n onBrushStart: 'brushStart',\n onBrushChange: 'brushChange',\n onBrushEnd: 'brushEnd',\n onBrushClear: 'brushClear'\n};\n\nexport const DATAZOOM_CUSTOMIZED_EVENTS = {\n onDataZoomChange: 'dataZoomChange'\n};\n\nexport const PLAYER_CUSTOMIZED_EVENTS = {\n onPlayerPlay: 'playerPlay',\n onPlayerPause: 'playerPause',\n onPlayerEnd: 'playerEnd',\n onPlayerChange: 'playerChange',\n onPlayerForward: 'playerForward',\n onPlayerBackward: 'playerBackward'\n};\n\nexport const SCROLLBAR_CUSTOMIZED_EVENTS = {\n onScrollBarChange: 'scrollBarChange'\n};\n\nexport const DIMENSION_EVENTS = {\n onDimensionHover: 'dimensionHover',\n onDimensionClick: 'dimensionClick'\n};\n\nexport const HIERARCHY_EVENTS = {\n onDrill: 'drill'\n};\n\nexport const CHART_LIFECYCLE_EVENTS = {\n onInitialized: 'initialized',\n onRendered: 'rendered',\n onRenderFinished: 'renderFinished',\n onAnimationFinished: 'animationFinished',\n onLayoutStart: 'layoutStart',\n onLayoutEnd: 'layoutEnd'\n};\n\nexport const CHART_EVENTS = {\n ...LEGEND_CUSTOMIZED_EVENTS,\n ...BRUSH_CUSTOMIZED_EVENTS,\n ...PLAYER_CUSTOMIZED_EVENTS,\n ...DATAZOOM_CUSTOMIZED_EVENTS,\n ...SCROLLBAR_CUSTOMIZED_EVENTS,\n ...DIMENSION_EVENTS,\n ...CHART_LIFECYCLE_EVENTS,\n ...HIERARCHY_EVENTS,\n ...REACT_TO_VCHART_EVENTS\n};\n\nexport const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);\n\nexport const COMMON_EVENTK_KEYS = Object.keys(REACT_TO_VCHART_EVENTS);\n\nexport const VCHART_TO_REACT_EVENTS = Object.keys(REACT_TO_VCHART_EVENTS).reduce((res, key) => {\n res[REACT_TO_VCHART_EVENTS[key]] = key;\n\n return res;\n}, {});\n\nexport const findEventProps = <T extends EventsProps>(\n props: T,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n): EventsProps => {\n const result: EventsProps = {};\n\n Object.keys(props).forEach(key => {\n if (supportedEvents[key] && props[key]) {\n result[key] = props[key];\n }\n });\n\n return result;\n};\n\nexport const bindEventsToChart = <T>(\n chart: IVChart,\n newProps?: T | null,\n prevProps?: T | null,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n) => {\n if ((!newProps && !prevProps) || !chart) {\n return false;\n }\n\n const prevEventProps = prevProps ? findEventProps(prevProps, supportedEvents) : null;\n const newEventProps = newProps ? findEventProps(newProps, supportedEvents) : null;\n\n if (prevEventProps) {\n Object.keys(prevEventProps).forEach(eventKey => {\n if (!newEventProps || !newEventProps[eventKey] || newEventProps[eventKey] !== prevEventProps[eventKey]) {\n const res = chart.off(supportedEvents[eventKey], prevProps[eventKey]);\n }\n });\n }\n\n if (newEventProps) {\n Object.keys(newEventProps).forEach(eventKey => {\n if (!prevEventProps || !prevEventProps[eventKey] || prevEventProps[eventKey] !== newEventProps[eventKey]) {\n chart.on(supportedEvents[eventKey], newEventProps[eventKey]);\n }\n });\n }\n\n return true;\n};\n"]}
|
package/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './charts';
|
|
2
2
|
export * from './series';
|
|
3
3
|
export * from './components';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
export
|
|
4
|
+
export * from './VChart';
|
|
5
|
+
export * from './VChartSimple';
|
|
6
|
+
export declare const version = "0.10.0-alpha.3";
|
|
7
|
+
export type { IAreaChartSpec, IBarChartSpec, IBar3dChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IFunnel3dChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, IHistogram3dChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, IPie3dChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeColumn3dChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, ILiquidChartSpec, IWordCloud3dChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, ITheme, IInitOption, ISpec, IVChart } from '@visactor/vchart';
|
package/esm/index.js
CHANGED
|
@@ -4,8 +4,9 @@ export * from "./series";
|
|
|
4
4
|
|
|
5
5
|
export * from "./components";
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export * from "./VChart";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
export * from "./VChartSimple";
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export const version = "0.10.0-alpha.3";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAG/B,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\nexport * from './VChartSimple';\n\n// export the version, since @1.8.3\nexport const version = \"0.10.0-alpha.3\";\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBar3dChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IFunnel3dChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n IHistogram3dChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n IPie3dChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeColumn3dChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n ICorrelationChartSpec,\n ILiquidChartSpec,\n IWordCloud3dChartSpec,\n IWordCloudChartSpec,\n IPolarChartSpec,\n ICartesianChartSpec,\n ITheme,\n IInitOption,\n ISpec,\n IVChart\n} from '@visactor/vchart';\n"]}
|
package/esm/series/Area.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Area: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IAreaSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Area: import("react").FC<BaseSeriesProps & Omit<IAreaSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Area.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Area.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IAreaSeriesSpec } from '@visactor/vchart';\n\nexport type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;\nexport const Area = createSeries<AreaProps>('Area', ['area'], 'area');\n"]}
|
package/esm/series/Bar.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Bar: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IBarSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Bar: import("react").FC<BaseSeriesProps & Omit<IBarSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,
|
|
1
|
+
{"version":3,"sources":["../src/series/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Bar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\n\nimport type { IBarSeriesSpec } from '@visactor/vchart';\n\nexport type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;\n\nexport const Bar = createSeries<BarProps>('Bar', ['bar'], 'bar');\n"]}
|
|
@@ -4,5 +4,6 @@ export interface BaseSeriesProps extends EventsProps {
|
|
|
4
4
|
id?: string | number;
|
|
5
5
|
}
|
|
6
6
|
export declare const createSeries: <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => React.FC<T & {
|
|
7
|
-
updateId
|
|
7
|
+
updateId?: number;
|
|
8
|
+
componentId?: string;
|
|
8
9
|
}>;
|
package/esm/series/BaseSeries.js
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import { isNil,
|
|
3
|
+
import { isNil, pickWithout } from "@visactor/vutils";
|
|
4
4
|
|
|
5
5
|
import RootChartContext from "../context/chart";
|
|
6
6
|
|
|
7
7
|
import { REACT_TO_VCHART_EVENTS, findEventProps, COMMON_EVENTK_KEYS, VCHART_TO_REACT_EVENTS } from "../eventsUtils";
|
|
8
8
|
|
|
9
|
-
import { uid } from "../util";
|
|
10
|
-
|
|
11
9
|
export const createSeries = (componentName, markNames, type) => {
|
|
12
|
-
const notSpecKeys = COMMON_EVENTK_KEYS.concat([ "id", "updateId" ]), Comp = props => {
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const notSpecKeys = COMMON_EVENTK_KEYS.concat([ "id", "updateId", "componentId" ]), Comp = props => {
|
|
11
|
+
var _a;
|
|
12
|
+
const context = React.useContext(RootChartContext), id = null !== (_a = props.id) && void 0 !== _a ? _a : props.componentId, bindedEvents = React.useRef({}), handleEvent = e => {
|
|
13
|
+
const markIds = markNames.map((markName => `${id}-${markName}`));
|
|
15
14
|
(null == e ? void 0 : e.mark) && markIds.includes(e.mark.getUserId()) && props[VCHART_TO_REACT_EVENTS[e.event.type]](e);
|
|
16
15
|
}, addMarkEvent = events => {
|
|
17
16
|
events && context.chart && (bindedEvents && Object.keys(bindedEvents).forEach((eventKey => {
|
|
@@ -21,52 +20,25 @@ export const createSeries = (componentName, markNames, type) => {
|
|
|
21
20
|
(null == bindedEvents ? void 0 : bindedEvents[eventKey]) || (context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent),
|
|
22
21
|
bindedEvents || (bindedEvents.current = {}), bindedEvents.current[eventKey] = !0);
|
|
23
22
|
})));
|
|
24
|
-
}, addMarkId = seriesSpec => {
|
|
25
|
-
markNames.forEach((markName => {
|
|
26
|
-
const defaultMarkId = `${id.current}-${markName}`;
|
|
27
|
-
isNil(seriesSpec[markName]) ? seriesSpec[markName] = {
|
|
28
|
-
id: defaultMarkId
|
|
29
|
-
} : isNil(seriesSpec[markName].id) && (seriesSpec[markName].id = defaultMarkId);
|
|
30
|
-
}));
|
|
31
|
-
}, insertToContext = props => {
|
|
32
|
-
if (context.specFromChildren) {
|
|
33
|
-
context.specFromChildren.series || (context.specFromChildren.series = []);
|
|
34
|
-
const seriesSpec = isNil(type) ? Object.assign(Object.assign({}, props), {
|
|
35
|
-
id: id.current
|
|
36
|
-
}) : Object.assign(Object.assign({}, props), {
|
|
37
|
-
id: id.current,
|
|
38
|
-
type: type
|
|
39
|
-
});
|
|
40
|
-
addMarkId(seriesSpec), context.specFromChildren.series.push(seriesSpec), context.isChildrenUpdated = !0;
|
|
41
|
-
}
|
|
42
23
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
isEqual(newSeriesSpec, seriesSpec.current) || (seriesSpec.current = newSeriesSpec,
|
|
46
|
-
(props => {
|
|
47
|
-
if (!context.specFromChildren) return;
|
|
48
|
-
if (!context.specFromChildren.series) return void insertToContext(props);
|
|
49
|
-
const series = context.specFromChildren.series, index = series.findIndex((entry => entry.id === id.current));
|
|
50
|
-
index >= 0 ? (series[index] = isNil(type) ? Object.assign(Object.assign({}, props), {
|
|
51
|
-
id: id.current
|
|
52
|
-
}) : Object.assign(Object.assign({}, props), {
|
|
53
|
-
id: id.current,
|
|
54
|
-
type: type
|
|
55
|
-
}), addMarkId(series[index])) : insertToContext(props), context.isChildrenUpdated = !0;
|
|
56
|
-
})(newSeriesSpec));
|
|
57
|
-
}
|
|
58
|
-
return React.useEffect((() => () => {
|
|
59
|
-
(() => {
|
|
60
|
-
var _a;
|
|
61
|
-
if (!context.specFromChildren) return;
|
|
62
|
-
const series = null !== (_a = context.specFromChildren.series) && void 0 !== _a ? _a : [], index = series.findIndex((entry => entry.id === id.current));
|
|
63
|
-
if (index >= 0) {
|
|
64
|
-
const newSeries = series.slice(0, index - 1).concat(series.slice(index + 1));
|
|
65
|
-
context.specFromChildren.series = newSeries, context.isChildrenUpdated = !0;
|
|
66
|
-
}
|
|
67
|
-
})(), addMarkEvent({});
|
|
24
|
+
return addMarkEvent(findEventProps(props)), React.useEffect((() => () => {
|
|
25
|
+
addMarkEvent({}), bindedEvents.current = {};
|
|
68
26
|
}), []), null;
|
|
69
27
|
};
|
|
70
|
-
return Comp.displayName = componentName, Comp
|
|
28
|
+
return Comp.displayName = componentName, Comp.parseSpec = compProps => {
|
|
29
|
+
var _a;
|
|
30
|
+
const newSeriesSpec = pickWithout(compProps, notSpecKeys);
|
|
31
|
+
var spec, seriesId;
|
|
32
|
+
return spec = newSeriesSpec, seriesId = null !== (_a = compProps.id) && void 0 !== _a ? _a : compProps.componentId,
|
|
33
|
+
markNames.forEach((markName => {
|
|
34
|
+
const defaultMarkId = `${seriesId}-${markName}`;
|
|
35
|
+
isNil(spec[markName]) ? spec[markName] = {
|
|
36
|
+
id: defaultMarkId
|
|
37
|
+
} : isNil(spec[markName].id) && (spec[markName].id = defaultMarkId);
|
|
38
|
+
})), isNil(type) || (newSeriesSpec.type = type), {
|
|
39
|
+
spec: newSeriesSpec,
|
|
40
|
+
specName: "series"
|
|
41
|
+
};
|
|
42
|
+
}, Comp;
|
|
71
43
|
};
|
|
72
44
|
//# sourceMappingURL=BaseSeries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/BaseSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA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AAC,EAAE,WAAW,CAAC,CAAC;oBAEhE,IAAI,CAAC,YAAY,EAAE;wBACjB,YAAY,CAAC,OAAO,GAAG,EAAE,CAAC;qBAC3B;oBACD,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;iBACvC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QAEF,MAAM,eAAe,GAAG,GAAG,EAAE;YAC3B,YAAY,CAAC,EAAE,CAAC,CAAC;QACnB,CAAC,CAAC;QAEF,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;QAEpC,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACnB,OAAO,GAAG,EAAE;gBACV,eAAe,EAAE,CAAC;gBAClB,YAAY,CAAC,OAAO,GAAG,EAAE,CAAC;YAC5B,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,IAAY,CAAC,SAAS,GAAG,CAAC,SAA0D,EAAE,EAAE;;QACvF,MAAM,aAAa,GAAG,WAAW,CAAI,SAAS,EAAE,WAAW,CAAC,CAAC;QAE7D,SAAS,CAAC,aAAa,EAAE,MAAA,SAAS,CAAC,EAAE,mCAAI,SAAS,CAAC,WAAW,CAAC,CAAC;QAEhE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;YACf,aAAqB,CAAC,IAAI,GAAG,IAAI,CAAC;SACpC;QAED,OAAO;YACL,IAAI,EAAE,aAAa;YACnB,QAAQ,EAAE,QAAQ;SACnB,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseSeries.js","sourcesContent":["import React from 'react';\nimport { isNil, pickWithout } from '@visactor/vutils';\nimport RootChartContext from '../context/chart';\nimport {\n REACT_TO_VCHART_EVENTS,\n EventsProps,\n findEventProps,\n COMMON_EVENTK_KEYS,\n VCHART_TO_REACT_EVENTS\n} from '../eventsUtils';\nexport interface BaseSeriesProps extends EventsProps {\n id?: string | number;\n}\n\nexport const createSeries = <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => {\n const ignoreKeys = ['id', 'updateId', 'componentId'];\n const notSpecKeys = COMMON_EVENTK_KEYS.concat(ignoreKeys);\n\n const addMarkId = (spec: any, seriesId: string | number) => {\n markNames.forEach(markName => {\n const defaultMarkId = `${seriesId}-${markName}`;\n\n if (isNil(spec[markName])) {\n spec[markName] = { id: defaultMarkId };\n } else if (isNil(spec[markName].id)) {\n spec[markName].id = defaultMarkId;\n }\n });\n };\n\n const Comp: React.FC<T & { updateId?: number; componentId?: string }> = props => {\n const context = React.useContext(RootChartContext);\n\n const id = props.id ?? props.componentId;\n const bindedEvents = React.useRef<Record<string, boolean>>({});\n\n const handleEvent = (e: any) => {\n const markIds = markNames.map(markName => `${id}-${markName}`);\n if (e?.mark && markIds.includes(e.mark.getUserId())) {\n props[VCHART_TO_REACT_EVENTS[e.event.type]](e);\n }\n };\n\n const addMarkEvent = (events: EventsProps) => {\n if (!events || !context.chart) {\n return;\n }\n\n if (bindedEvents) {\n Object.keys(bindedEvents).forEach(eventKey => {\n if (!events[eventKey]) {\n context.chart.off(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n }\n bindedEvents.current[eventKey] = false;\n });\n }\n\n Object.keys(events).forEach(eventKey => {\n if (!bindedEvents?.[eventKey]) {\n context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n\n if (!bindedEvents) {\n bindedEvents.current = {};\n }\n bindedEvents.current[eventKey] = true;\n }\n });\n };\n\n const removeMarkEvent = () => {\n addMarkEvent({});\n };\n\n addMarkEvent(findEventProps(props));\n\n React.useEffect(() => {\n return () => {\n removeMarkEvent();\n bindedEvents.current = {};\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n (Comp as any).parseSpec = (compProps: T & { updateId?: number; componentId?: string }) => {\n const newSeriesSpec = pickWithout<T>(compProps, notSpecKeys);\n\n addMarkId(newSeriesSpec, compProps.id ?? compProps.componentId);\n\n if (!isNil(type)) {\n (newSeriesSpec as any).type = type;\n }\n\n return {\n spec: newSeriesSpec,\n specName: 'series'\n };\n };\n return Comp;\n};\n"]}
|
package/esm/series/BoxPlot.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const BoxPlot: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IBoxPlotSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;
|
|
4
|
+
export declare const BoxPlot: import("react").FC<BaseSeriesProps & Omit<IBoxPlotSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/BoxPlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/BoxPlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"BoxPlot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IBoxPlotSeriesSpec } from '@visactor/vchart';\n\nexport type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;\n\nexport const BoxPlot = createSeries<BoxPlotProps>('BoxPlot', ['boxPlot'], 'boxPlot');\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const CircularProgress: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { ICircularProgressSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;
|
|
4
|
+
export declare const CircularProgress: import("react").FC<BaseSeriesProps & Omit<ICircularProgressSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAC1C,kBAAkB,EAClB,CAAC,kBAAkB,CAAC,EACpB,kBAAkB,CACnB,CAAC","file":"CircularProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ICircularProgressSeriesSpec } from '@visactor/vchart';\n\nexport type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;\n\nexport const CircularProgress = createSeries<CircularProgressProps>(\n 'CircularProgress',\n ['circularProgress'],\n 'circularProgress'\n);\n"]}
|
package/esm/series/Dot.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Dot: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IDotSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Dot: import("react").FC<BaseSeriesProps & Omit<IDotSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Dot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Dot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IDotSeriesSpec } from '@visactor/vchart';\n\nexport type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;\n\nexport const Dot = createSeries<DotProps>('Dot', ['dot'], 'dot');\n"]}
|
package/esm/series/Funnel.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Funnel: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IFunnelSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Funnel: import("react").FC<BaseSeriesProps & Omit<IFunnelSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Funnel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Funnel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Funnel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC","file":"Funnel.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IFunnelSeriesSpec } from '@visactor/vchart';\n\nexport type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;\n\nexport const Funnel = createSeries<FunnelProps>('Funnel', ['funnel'], 'funnel');\n"]}
|
package/esm/series/Line.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Line: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { ILineSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Line: import("react").FC<BaseSeriesProps & Omit<ILineSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Line.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Line.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ILineSeriesSpec } from '@visactor/vchart';\n\nexport type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;\n\nexport const Line = createSeries<LineProps>('Line', ['line'], 'line');\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const LinearProgress: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { ILinearProgressSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;
|
|
4
|
+
export declare const LinearProgress: import("react").FC<BaseSeriesProps & Omit<ILinearProgressSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { createSeries } from "./BaseSeries";
|
|
2
2
|
|
|
3
|
-
export const LinearProgress = createSeries("LinearProgress", [ "linearProgress" ], "linearProgress");
|
|
4
|
-
//# sourceMappingURL=LinearProgress.js.map
|
|
3
|
+
export const LinearProgress = createSeries("LinearProgress", [ "linearProgress" ], "linearProgress");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAsB,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC","file":"LinearProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ILinearProgressSeriesSpec } from '@visactor/vchart';\n\nexport type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;\n\nexport const LinearProgress = createSeries<LinearProgressProps>('LinearProgress', ['linearProgress'], 'linearProgress');\n"]}
|
package/esm/series/Link.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Link: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { ILinkSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Link: import("react").FC<BaseSeriesProps & Omit<ILinkSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Link.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { ILinkSeriesSpec } from '@visactor/vchart';\n\nexport type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;\n\nexport const Link = createSeries<LinkProps>('Link', ['link'], 'link');\n"]}
|
package/esm/series/Map.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Map: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IMapSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Map: import("react").FC<BaseSeriesProps & Omit<IMapSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Map.js
CHANGED
package/esm/series/Map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Map.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Map.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IMapSeriesSpec } from '@visactor/vchart';\n\nexport type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;\n\nexport const Map = createSeries<MapProps>('Map', ['map'], 'map');\n"]}
|
package/esm/series/Pie.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Pie: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IPieSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Pie: import("react").FC<BaseSeriesProps & Omit<IPieSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Pie.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Pie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Pie.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Pie.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IPieSeriesSpec } from '@visactor/vchart';\n\nexport type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;\n\nexport const Pie = createSeries<PieProps>('Pie', ['pie'], 'pie');\n"]}
|
package/esm/series/Radar.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Radar: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IRadarSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Radar: import("react").FC<BaseSeriesProps & Omit<IRadarSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Radar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Radar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Radar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAa,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC","file":"Radar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IRadarSeriesSpec } from '@visactor/vchart';\n\nexport type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;\n\nexport const Radar = createSeries<RadarProps>('Radar', ['radar'], 'radar');\n"]}
|