@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
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const RangeColumn: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IRangeColumnSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;
|
|
4
|
+
export declare const RangeColumn: import("react").FC<BaseSeriesProps & Omit<IRangeColumnSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/RangeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/RangeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAmB,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC","file":"RangeColumn.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IRangeColumnSeriesSpec } from '@visactor/vchart';\n\nexport type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;\n\nexport const RangeColumn = createSeries<RangeColumnProps>('RangeColumn', ['rangeColumn'], 'rangeColumn');\n"]}
|
package/esm/series/Rose.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Rose: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IRoseSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Rose: import("react").FC<BaseSeriesProps & Omit<IRoseSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/Rose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Rose.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Rose.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":"Rose.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IRoseSeriesSpec } from '@visactor/vchart';\n\nexport type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;\n\nexport const Rose = createSeries<RoseProps>('Rose', ['rose'], 'rose');\n"]}
|
package/esm/series/Scatter.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Scatter: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IScatterSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;
|
|
4
|
+
export declare const Scatter: import("react").FC<BaseSeriesProps & Omit<IScatterSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Scatter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Scatter.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":"Scatter.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IScatterSeriesSpec } from '@visactor/vchart';\n\nexport type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;\n\nexport const Scatter = createSeries<ScatterProps>('Scatter', ['scatter'], 'scatter');\n"]}
|
package/esm/series/Series.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IBarSeriesSpec, IAreaSeriesSpec, IBoxPlotSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnelSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPieSeriesSpec, IRadarSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, IScatterSeriesSpec, IWordCloudSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type SeriesProps = (IBarSeriesSpec | IAreaSeriesSpec | IBoxPlotSeriesSpec | ICircularProgressSeriesSpec | IDotSeriesSpec | IFunnelSeriesSpec | ILineSeriesSpec | ILinearProgressSeriesSpec | ILinkSeriesSpec | IMapSeriesSpec | IPieSeriesSpec | IRadarSeriesSpec | IRangeColumnSeriesSpec | IRoseSeriesSpec | IScatterSeriesSpec | IWordCloudSeriesSpec) & BaseSeriesProps;
|
|
4
|
+
export declare const Series: import("react").FC<SeriesProps & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
7
7
|
}>;
|
package/esm/series/Series.js
CHANGED
package/esm/series/Series.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Series.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/Series.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAuC7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC","file":"Series.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type {\n IBarSeriesSpec,\n IAreaSeriesSpec,\n IBoxPlotSeriesSpec,\n ICircularProgressSeriesSpec,\n IDotSeriesSpec,\n IFunnelSeriesSpec,\n ILineSeriesSpec,\n ILinearProgressSeriesSpec,\n ILinkSeriesSpec,\n IMapSeriesSpec,\n IPieSeriesSpec,\n IRadarSeriesSpec,\n IRangeColumnSeriesSpec,\n IRoseSeriesSpec,\n IScatterSeriesSpec,\n IWordCloudSeriesSpec\n} from '@visactor/vchart';\nexport type SeriesProps = (\n | IBarSeriesSpec\n | IAreaSeriesSpec\n | IBoxPlotSeriesSpec\n | ICircularProgressSeriesSpec\n | IDotSeriesSpec\n | IFunnelSeriesSpec\n | ILineSeriesSpec\n | ILinearProgressSeriesSpec\n | ILinkSeriesSpec\n | IMapSeriesSpec\n | IPieSeriesSpec\n | IRadarSeriesSpec\n | IRangeColumnSeriesSpec\n | IRoseSeriesSpec\n | IScatterSeriesSpec\n | IWordCloudSeriesSpec\n) &\n BaseSeriesProps;\n\nexport const Series = createSeries<SeriesProps>('Series', ['bar', 'line', 'area']);\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const WordCloud: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import type { IWordCloudSeriesSpec } from '@visactor/vchart';
|
|
3
|
+
export type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;
|
|
4
|
+
export declare const WordCloud: import("react").FC<BaseSeriesProps & Omit<IWordCloudSeriesSpec, "type"> & {
|
|
5
|
+
updateId?: number;
|
|
6
|
+
componentId?: string;
|
|
6
7
|
}>;
|
package/esm/series/WordCloud.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/WordCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/series/WordCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAiB,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC","file":"WordCloud.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport type { IWordCloudSeriesSpec } from '@visactor/vchart';\n\nexport type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;\n\nexport const WordCloud = createSeries<WordCloudProps>('WordCloud', ['wordCloud'], 'wordCloud');\n"]}
|
package/esm/series/index.js
CHANGED
package/esm/series/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC","file":"index.js","sourcesContent":["export * from './Series';\n\nexport * from './Line';\nexport * from './Area';\nexport * from './Bar';\nexport * from './Scatter';\nexport * from './Map';\nexport * from './Pie';\nexport * from './Rose';\nexport * from './Radar';\nexport * from './Dot';\nexport * from './Link';\nexport * from './CircularProgress';\nexport * from './WordCloud';\nexport * from './Funnel';\nexport * from './LinearProgress';\nexport * from './RangeColumn';\nexport * from './BoxPlot';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/series/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAEzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC","file":"index.js","sourcesContent":["export * from './Series';\n\nexport * from './Line';\nexport * from './Area';\nexport * from './Bar';\nexport * from './Scatter';\nexport * from './Map';\nexport * from './Pie';\nexport * from './Rose';\nexport * from './Radar';\nexport * from './Dot';\nexport * from './Link';\nexport * from './CircularProgress';\nexport * from './WordCloud';\nexport * from './Funnel';\nexport * from './LinearProgress';\nexport * from './RangeColumn';\nexport * from './BoxPlot';\n"]}
|
package/esm/util.js
CHANGED
package/esm/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAA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,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAChC,MAAM,SAAS,GAAG,cAAc,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;QAEzD,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,KAAU,CAAC,CAAC;SACzB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAKF,MAAM,CAAC,MAAM,eAAe,GAAG,CAA0C,QAAyB,EAAE,IAAQ,EAAK,EAAE;IACjH,MAAM,MAAM,GAAG,aAAa,CAAQ,QAAQ,EAAE,IAAI,CAAC,CAAC;IAEpD,OAAO,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC","file":"util.js","sourcesContent":["import { isNil, isArray, isString, isFunction, isPlainObject } from '@visactor/vutils';\nimport React, { ReactNode } from 'react';\nimport { isFragment } from 'react-is';\n\nlet id = 0;\n\nexport const uid = (prefix?: string) => {\n if (prefix) {\n return `${prefix}-${id++}`;\n }\n\n return `${id++}`;\n};\n\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\nexport const getDisplayName = (Comp: any) => {\n if (typeof Comp === 'string') {\n return Comp;\n }\n if (!Comp) {\n return '';\n }\n return Comp.displayName || Comp.name;\n};\n\nexport const typeOfComponent = (component: any, customTypeKey = '__TYPE'): string => {\n return (\n (component?.props && component.props[customTypeKey]) ||\n (typeof component?.type === 'string' && component.type) ||\n (component?.type &&\n typeof component.type === 'symbol' &&\n component.type.toString() === 'Symbol(react.fragment)' &&\n 'react.fragment') ||\n (typeof component?.type === 'function' && component.type) ||\n (typeof component?.type === 'object' &&\n component.type.$$typeof.toString() === 'Symbol(react.forward_ref)' &&\n 'react.forward_ref') ||\n (typeof component === 'string' && 'string') ||\n (typeof component === 'function' && 'function') ||\n undefined\n );\n};\n\nexport const toArray = <T = ReactNode, TC = ReactNode>(children: T): TC[] => {\n let result: TC[] = [];\n\n React.Children.forEach(children, child => {\n if (isNil(child)) return;\n\n if (isFragment(child)) {\n result = result.concat(toArray(child.props.children));\n } else {\n result.push(child as unknown as TC);\n }\n });\n\n return result;\n};\n\n/*\n * Find and return all matched children by type. `type` can be a React element class or\n * string\n */\nexport const findAllByType = <T extends React.ReactNode, TC = unknown>(\n children: React.ReactNode,\n type: TC | TC[]\n): T[] => {\n const result: T[] = [];\n let types: string[] = [];\n\n if (isArray(type)) {\n types = type.map(t => getDisplayName(t));\n } else {\n types = [getDisplayName(type)];\n }\n\n toArray(children).forEach(child => {\n const childType = getDisplayName(typeOfComponent(child));\n\n if (types.indexOf(childType) !== -1) {\n result.push(child as T);\n }\n });\n\n return result;\n};\n/*\n * Return the first matched child by type, return null otherwise.\n * `type` can be a React element class or string.\n */\nexport const findChildByType = <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC): T => {\n const result = findAllByType<T, TC>(children, type);\n\n return result?.[0];\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAuC,MAAM,kBAAkB,CAAC;AACvF,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,MAAe,EAAE,EAAE;IACrC,IAAI,MAAM,EAAE;QACV,OAAO,GAAG,MAAM,IAAI,EAAE,EAAE,EAAE,CAAC;KAC5B;IAED,OAAO,GAAG,EAAE,EAAE,EAAE,CAAC;AACnB,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAS,EAAE,EAAE;IAC1C,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;QAC5B,OAAO,IAAI,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AN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC","file":"util.js","sourcesContent":["import { isNil, isArray, isString, isFunction, isPlainObject } from '@visactor/vutils';\nimport React, { ReactNode } from 'react';\nimport { isFragment } from 'react-is';\n\nlet id = 0;\n\nexport const uid = (prefix?: string) => {\n if (prefix) {\n return `${prefix}-${id++}`;\n }\n\n return `${id++}`;\n};\n\n/**\n * Get the display name of a component\n * @param {Object} Comp Specified Component\n * @return {String} Display name of Component\n */\nexport const getDisplayName = (Comp: any) => {\n if (typeof Comp === 'string') {\n return Comp;\n }\n if (!Comp) {\n return '';\n }\n return Comp.displayName || Comp.name;\n};\n\nexport const typeOfComponent = (component: any, customTypeKey = '__TYPE'): string => {\n return (\n (component?.props && component.props[customTypeKey]) ||\n (typeof component?.type === 'string' && component.type) ||\n (component?.type &&\n typeof component.type === 'symbol' &&\n component.type.toString() === 'Symbol(react.fragment)' &&\n 'react.fragment') ||\n (typeof component?.type === 'function' && component.type) ||\n (typeof component?.type === 'object' &&\n component.type.$$typeof.toString() === 'Symbol(react.forward_ref)' &&\n 'react.forward_ref') ||\n (typeof component === 'string' && 'string') ||\n (typeof component === 'function' && 'function') ||\n undefined\n );\n};\n\nexport const toArray = <T = ReactNode, TC = ReactNode>(children: T): TC[] => {\n let result: TC[] = [];\n\n React.Children.forEach(children, child => {\n if (isNil(child)) return;\n\n if (isFragment(child)) {\n result = result.concat(toArray(child.props.children));\n } else {\n result.push(child as unknown as TC);\n }\n });\n\n return result;\n};\n\n/*\n * Find and return all matched children by type. `type` can be a React element class or\n * string\n */\nexport const findAllByType = <T extends React.ReactNode, TC = unknown>(\n children: React.ReactNode,\n type: TC | TC[]\n): T[] => {\n const result: T[] = [];\n let types: string[] = [];\n\n if (isArray(type)) {\n types = type.map(t => getDisplayName(t));\n } else {\n types = [getDisplayName(type)];\n }\n\n toArray(children).forEach(child => {\n const childType = getDisplayName(typeOfComponent(child));\n\n if (types.indexOf(childType) !== -1) {\n result.push(child as T);\n }\n });\n\n return result;\n};\n/*\n * Return the first matched child by type, return null otherwise.\n * `type` can be a React element class or string.\n */\nexport const findChildByType = <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC): T => {\n const result = findAllByType<T, TC>(children, type);\n\n return result?.[0];\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/react-vchart",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.10.0-alpha.3",
|
|
4
|
+
"sideEffects": false,
|
|
4
5
|
"description": "The react version of VChart 4.x",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"react",
|
|
@@ -22,10 +23,11 @@
|
|
|
22
23
|
"dist"
|
|
23
24
|
],
|
|
24
25
|
"dependencies": {
|
|
25
|
-
"@visactor/vchart": "0.0
|
|
26
|
-
"@visactor/vutils": "0.
|
|
27
|
-
"@visactor/
|
|
28
|
-
"@visactor/vrender": "0.
|
|
26
|
+
"@visactor/vchart": "0.10.0-alpha.3",
|
|
27
|
+
"@visactor/vutils": "~0.17.4",
|
|
28
|
+
"@visactor/vrender-core": "0.18.0-alpha.4",
|
|
29
|
+
"@visactor/vrender-kits": "0.18.0-alpha.4",
|
|
30
|
+
"@visactor/vgrammar-core": "0.11.12",
|
|
29
31
|
"react-is": "^18.2.0"
|
|
30
32
|
},
|
|
31
33
|
"devDependencies": {
|
|
@@ -53,14 +55,14 @@
|
|
|
53
55
|
"@vitejs/plugin-react": "3.1.0",
|
|
54
56
|
"vite": "3.2.6",
|
|
55
57
|
"@internal/bundler": "0.0.1",
|
|
56
|
-
"@internal/
|
|
57
|
-
"@internal/
|
|
58
|
+
"@internal/eslint-config": "0.0.1",
|
|
59
|
+
"@internal/ts-config": "0.0.1"
|
|
58
60
|
},
|
|
59
61
|
"peerDependencies": {
|
|
60
62
|
"react": ">=16.0.0",
|
|
61
63
|
"react-dom": ">=16.0.0"
|
|
62
64
|
},
|
|
63
|
-
"homepage": "",
|
|
65
|
+
"homepage": "https://www.visactor.io/vchart",
|
|
64
66
|
"bugs": "https://github.com/VisActor/VChart/issues",
|
|
65
67
|
"repository": {
|
|
66
68
|
"type": "git",
|
|
@@ -69,7 +71,7 @@
|
|
|
69
71
|
},
|
|
70
72
|
"author": {
|
|
71
73
|
"name": "VisActor",
|
|
72
|
-
"url": "https://
|
|
74
|
+
"url": "https://www.visactor.io/"
|
|
73
75
|
},
|
|
74
76
|
"license": "MIT",
|
|
75
77
|
"publishConfig": {
|