@visactor/react-vchart 0.0.1-alpha.1 → 0.16.17-alpha.2
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 +1 -1
- package/cjs/charts/AreaChart.d.ts +4 -1
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +4 -1
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +7 -5
- package/cjs/charts/BaseChart.js +33 -10
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +4 -1
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +4 -1
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +4 -1
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +4 -1
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +4 -1
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +4 -1
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +4 -1
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +4 -1
- package/cjs/charts/MapChart.js +2 -1
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +4 -1
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +4 -1
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +4 -1
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +4 -1
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +4 -1
- package/cjs/charts/ScatterChart.js +1 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +4 -1
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +4 -1
- 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 +1 -1
- package/cjs/components/BaseComponent.js +10 -5
- 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 +2 -2
- package/cjs/components/Mark.js +3 -2
- 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.map +1 -1
- package/cjs/components/ScrollBar.d.ts +5 -0
- package/cjs/components/ScrollBar.js +9 -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/containers/withContainer.d.ts +2 -2
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/stage.d.ts +1 -1
- 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 +146 -47
- package/cjs/eventsUtils.js +33 -4
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +4 -12
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +5 -5
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +5 -5
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.d.ts +1 -1
- package/cjs/series/BaseSeries.js +6 -6
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +5 -5
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +5 -5
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +5 -5
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +5 -5
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +5 -5
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +5 -5
- package/cjs/series/LinearProgress.js +2 -1
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +5 -5
- package/cjs/series/Link.js +1 -2
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +5 -5
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +5 -5
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +5 -5
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +5 -5
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +5 -5
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +5 -5
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +5 -6
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +5 -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/util.js +1 -1
- package/esm/VChart.d.ts +1 -1
- package/esm/charts/AreaChart.d.ts +4 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +4 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +7 -5
- package/esm/charts/BaseChart.js +34 -10
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +4 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +4 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +4 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +4 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +4 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +4 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +4 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +4 -1
- package/esm/charts/MapChart.js +2 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +4 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +4 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +4 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +4 -1
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +4 -1
- package/esm/charts/ScatterChart.js +1 -2
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +4 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +4 -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 +1 -1
- package/esm/components/BaseComponent.js +11 -5
- 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 +2 -2
- package/esm/components/Mark.js +3 -2
- 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.map +1 -1
- package/esm/components/ScrollBar.d.ts +5 -0
- package/esm/components/ScrollBar.js +5 -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/containers/withContainer.d.ts +2 -2
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/stage.d.ts +1 -1
- 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 +146 -47
- package/esm/eventsUtils.js +46 -3
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +5 -5
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +5 -5
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.d.ts +1 -1
- package/esm/series/BaseSeries.js +6 -6
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +5 -5
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +5 -5
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +5 -5
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +5 -5
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +5 -5
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +5 -5
- package/esm/series/LinearProgress.js +2 -1
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +5 -5
- package/esm/series/Link.js +1 -2
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +5 -5
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +5 -5
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +5 -5
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +5 -5
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +5 -5
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +5 -5
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +5 -6
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +5 -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/util.js +1 -1
- package/package.json +10 -9
package/cjs/series/BoxPlot.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const BoxPlot: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/BoxPlot.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/BoxPlot.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,OAAO,GAAG,IAAA,yBAAY,EAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"BoxPlot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { 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,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const CircularProgress: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/CircularProgress.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/CircularProgress.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,gBAAgB,GAAG,IAAA,yBAAY,EAC1C,kBAAkB,EAClB,CAAC,kBAAkB,CAAC,EACpB,kBAAkB,CACnB,CAAC","file":"CircularProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { 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/cjs/series/Dot.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Dot: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Dot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Dot.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Dot.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,GAAG,GAAG,IAAA,yBAAY,EAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Dot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IDotSeriesSpec } from '@visactor/vchart';\n\nexport type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;\n\nexport const Dot = createSeries<DotProps>('Dot', ['dot'], 'dot');\n"]}
|
package/cjs/series/Funnel.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Funnel: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Funnel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Funnel.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Funnel.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,MAAM,GAAG,IAAA,yBAAY,EAAc,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC","file":"Funnel.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IFunnelSeriesSpec } from '@visactor/vchart';\n\nexport type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;\n\nexport const Funnel = createSeries<FunnelProps>('Funnel', ['funnel'], 'funnel');\n"]}
|
package/cjs/series/Line.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Line: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Line.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Line.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Line.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,IAAI,GAAG,IAAA,yBAAY,EAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Line.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { 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,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const LinearProgress: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
|
@@ -6,4 +6,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
|
|
7
7
|
const BaseSeries_1 = require("./BaseSeries");
|
|
8
8
|
|
|
9
|
-
exports.LinearProgress = (0, BaseSeries_1.createSeries)("LinearProgress", [ "linearProgress" ], "linearProgress");
|
|
9
|
+
exports.LinearProgress = (0, BaseSeries_1.createSeries)("LinearProgress", [ "linearProgress" ], "linearProgress");
|
|
10
|
+
//# sourceMappingURL=LinearProgress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/LinearProgress.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/LinearProgress.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,cAAc,GAAG,IAAA,yBAAY,EAAsB,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC","file":"LinearProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILinearProgressSeriesSpec } from '@visactor/vchart';\n\nexport type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;\n\nexport const LinearProgress = createSeries<LinearProgressProps>('LinearProgress', ['linearProgress'], 'linearProgress');\n"]}
|
package/cjs/series/Link.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Link: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Link.js
CHANGED
|
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
|
|
7
7
|
const BaseSeries_1 = require("./BaseSeries");
|
|
8
8
|
|
|
9
|
-
exports.Link = (0, BaseSeries_1.createSeries)("Link", [ "link" ], "link");
|
|
10
|
-
//# sourceMappingURL=Link.js.map
|
|
9
|
+
exports.Link = (0, BaseSeries_1.createSeries)("Link", [ "link" ], "link");
|
package/cjs/series/Link.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Link.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Link.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,IAAI,GAAG,IAAA,yBAAY,EAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Link.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILinkSeriesSpec } from '@visactor/vchart';\n\nexport type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;\n\nexport const Link = createSeries<LinkProps>('Link', ['link'], 'link');\n"]}
|
package/cjs/series/Map.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Map: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Map.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Map.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,GAAG,GAAG,IAAA,yBAAY,EAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Map.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IMapSeriesSpec } from '@visactor/vchart';\n\nexport type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;\n\nexport const Map = createSeries<MapProps>('Map', ['map'], 'map');\n"]}
|
package/cjs/series/Pie.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Pie: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Pie.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Pie.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Pie.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,GAAG,GAAG,IAAA,yBAAY,EAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Pie.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IPieSeriesSpec } from '@visactor/vchart';\n\nexport type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;\n\nexport const Pie = createSeries<PieProps>('Pie', ['pie'], 'pie');\n"]}
|
package/cjs/series/Radar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Radar: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Radar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Radar.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Radar.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,KAAK,GAAG,IAAA,yBAAY,EAAa,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC","file":"Radar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRadarSeriesSpec } from '@visactor/vchart';\n\nexport type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;\n\nexport const Radar = createSeries<RadarProps>('Radar', ['radar'], 'radar');\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const RangeColumn: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/RangeColumn.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/RangeColumn.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,WAAW,GAAG,IAAA,yBAAY,EAAmB,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC","file":"RangeColumn.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRangeColumnSeriesSpec } from '@visactor/vchart';\n\nexport type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;\n\nexport const RangeColumn = createSeries<RangeColumnProps>('RangeColumn', ['rangeColumn'], 'rangeColumn');\n"]}
|
package/cjs/series/Rose.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Rose: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/Rose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Rose.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Rose.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,IAAI,GAAG,IAAA,yBAAY,EAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Rose.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRoseSeriesSpec } from '@visactor/vchart';\n\nexport type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;\n\nexport const Rose = createSeries<RoseProps>('Rose', ['rose'], 'rose');\n"]}
|
package/cjs/series/Scatter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const Scatter: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Scatter.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Scatter.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,OAAO,GAAG,IAAA,yBAAY,EAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"Scatter.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IScatterSeriesSpec } from '@visactor/vchart';\n\nexport type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;\n\nexport const Scatter = createSeries<ScatterProps>('Scatter', ['scatter'], 'scatter');\n"]}
|
package/cjs/series/Series.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
updateId: number;
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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;
|
|
7
6
|
}>;
|
package/cjs/series/Series.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/Series.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/Series.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAuChD,QAAA,MAAM,GAAG,IAAA,yBAAY,EAAc,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC","file":"Series.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport {\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,6 @@
|
|
|
1
|
-
import { BaseSeriesProps } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export declare const WordCloud: import("react").FC<BaseSeriesProps & {
|
|
5
|
-
updateId
|
|
1
|
+
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
+
import { 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
6
|
}>;
|
package/cjs/series/WordCloud.js
CHANGED
|
@@ -7,4 +7,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
const BaseSeries_1 = require("./BaseSeries");
|
|
8
8
|
|
|
9
9
|
exports.WordCloud = (0, BaseSeries_1.createSeries)("WordCloud", [ "wordCloud" ], "wordCloud");
|
|
10
|
-
//# sourceMappingURL=WordCloud.js.map
|
|
10
|
+
//# sourceMappingURL=WordCloud.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["series/WordCloud.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;
|
|
1
|
+
{"version":3,"sources":["series/WordCloud.tsx"],"names":[],"mappings":";;;AAAA,6CAA6D;AAKhD,QAAA,SAAS,GAAG,IAAA,yBAAY,EAAiB,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC","file":"WordCloud.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IWordCloudSeriesSpec } from '@visactor/vchart';\n\nexport type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;\n\nexport const WordCloud = createSeries<WordCloudProps>('WordCloud', ['wordCloud'], 'wordCloud');\n"]}
|
package/cjs/series/index.js
CHANGED
|
@@ -26,4 +26,4 @@ __exportStar(require("./Link"), exports), __exportStar(require("./CircularProgre
|
|
|
26
26
|
__exportStar(require("./WordCloud"), exports), __exportStar(require("./Funnel"), exports),
|
|
27
27
|
__exportStar(require("./LinearProgress"), exports), __exportStar(require("./RangeColumn"), exports),
|
|
28
28
|
__exportStar(require("./BoxPlot"), exports);
|
|
29
|
-
//# sourceMappingURL=index.js.map
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/util.js
CHANGED
package/esm/VChart.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { BaseChartProps } from './charts/BaseChart';
|
|
2
2
|
export type VChartProps = Omit<BaseChartProps, 'container'>;
|
|
3
|
-
export declare const VChart: import("react").ForwardRefExoticComponent<import("./containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
|
|
3
|
+
export declare const VChart: import("react").ForwardRefExoticComponent<VChartProps & import("./containers/withContainer").ContainerProps & import("react").RefAttributes<any>>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IAreaChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface AreaChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IAreaChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const AreaChart:
|
|
6
|
+
export declare const AreaChart: React.ForwardRefExoticComponent<AreaChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/AreaChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/AreaChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAA0C,WAAW,EAAE,MAAM,CAAC,CAAC","file":"AreaChart.js","sourcesContent":["import React from 'react';\nimport { IAreaChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface AreaChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IAreaChartSpec, 'type'> {}\n\nexport const AreaChart = createChart<React.PropsWithChildren<AreaChartProps>>('AreaChart', 'area');\n"]}
|
package/esm/charts/BarChart.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IBarChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface BarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IBarChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const BarChart:
|
|
6
|
+
export declare const BarChart: React.ForwardRefExoticComponent<BarChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/BarChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/BarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAQ1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAyC,UAAU,EAAE,KAAK,CAAC,CAAC","file":"BarChart.js","sourcesContent":["import React from 'react';\nimport { IBarChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface BarChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IBarChartSpec, 'type'> {\n //\n}\n\nexport const BarChart = createChart<React.PropsWithChildren<BarChartProps>>('BarChart', 'bar');\n"]}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import VChart, { IData, IInitOption } from '@visactor/vchart';
|
|
1
|
+
import VChart, { IData, IInitOption, ISpec } from '@visactor/vchart';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ContainerProps } from '../containers/withContainer';
|
|
4
|
-
import { EventsProps } from '../eventsUtils';
|
|
4
|
+
import { EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps } from '../eventsUtils';
|
|
5
5
|
export type ChartOptions = Omit<IInitOption, 'dom'>;
|
|
6
|
-
export interface BaseChartProps extends EventsProps {
|
|
6
|
+
export interface BaseChartProps extends EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps {
|
|
7
7
|
type?: string;
|
|
8
8
|
container?: HTMLDivElement;
|
|
9
|
-
spec?:
|
|
9
|
+
spec?: ISpec;
|
|
10
10
|
data?: IData;
|
|
11
11
|
width?: number;
|
|
12
12
|
height?: number;
|
|
13
13
|
options?: ChartOptions;
|
|
14
|
+
skipFunctionDiff?: boolean;
|
|
14
15
|
onReady?: (instance: VChart, isInitial: boolean) => void;
|
|
16
|
+
onError?: (err: Error) => void;
|
|
15
17
|
}
|
|
16
18
|
type Props = React.PropsWithChildren<BaseChartProps>;
|
|
17
|
-
export declare const createChart: <T extends Props>(componentName: string, type?: string, callback?: (props: T) => T) => React.ForwardRefExoticComponent<ContainerProps & React.RefAttributes<any>>;
|
|
19
|
+
export declare const createChart: <T extends Props>(componentName: string, type?: string, callback?: (props: T) => T) => React.ForwardRefExoticComponent<React.PropsWithoutRef<T & ContainerProps> & React.RefAttributes<any>>;
|
|
18
20
|
export {};
|
package/esm/charts/BaseChart.js
CHANGED
|
@@ -16,35 +16,59 @@ import { REACT_PRIVATE_PROPS } from "../constants";
|
|
|
16
16
|
|
|
17
17
|
import { bindEventsToChart, CHART_EVENTS_KEYS, CHART_EVENTS } from "../eventsUtils";
|
|
18
18
|
|
|
19
|
-
const notSpecKeys = [ ...REACT_PRIVATE_PROPS, ...CHART_EVENTS_KEYS, "spec", "container", "options" ], BaseChart = React.forwardRef(((props, ref) => {
|
|
19
|
+
const notSpecKeys = [ ...REACT_PRIVATE_PROPS, ...CHART_EVENTS_KEYS, "skipFunctionDiff", "onError", "onReady", "spec", "container", "options" ], BaseChart = React.forwardRef(((props, ref) => {
|
|
20
20
|
const [updateId, setUpdateId] = useState(0), chartContext = useRef({
|
|
21
21
|
specFromChildren: {}
|
|
22
22
|
});
|
|
23
23
|
useImperativeHandle(ref, (() => chartContext.current.chart));
|
|
24
|
-
const hasSpec = !!props.spec, [view, setView] = useState(null), isUnmount = useRef(!1), prevSpec = useRef(pickWithout(props, notSpecKeys)), eventsBinded = React.useRef(null), parseSpec = props => hasSpec && props.spec ? props.spec : Object.assign(Object.assign({}, prevSpec.current), chartContext.current.specFromChildren), handleChartRender = () => {
|
|
24
|
+
const hasSpec = !!props.spec, [view, setView] = useState(null), isUnmount = useRef(!1), prevSpec = useRef(pickWithout(props, notSpecKeys)), eventsBinded = React.useRef(null), skipFunctionDiff = !!props.skipFunctionDiff, parseSpec = props => hasSpec && props.spec ? props.spec : Object.assign(Object.assign({}, prevSpec.current), chartContext.current.specFromChildren), handleChartRender = () => {
|
|
25
|
+
bindEventsToChart(chartContext.current.chart, props, eventsBinded.current, CHART_EVENTS);
|
|
25
26
|
const newView = chartContext.current.chart.getCompiler().getVGrammarView();
|
|
26
|
-
|
|
27
|
+
isUnmount.current || (setUpdateId(updateId + 1), props.onReady && props.onReady(chartContext.current.chart, 0 === updateId)),
|
|
27
28
|
setView(newView);
|
|
28
29
|
};
|
|
29
30
|
return useEffect((() => {
|
|
30
31
|
if (!chartContext.current.chart) return (props => {
|
|
31
32
|
const cs = new VChart(parseSpec(props), Object.assign(Object.assign({}, props.options), {
|
|
32
33
|
autoFit: !0,
|
|
33
|
-
mode: "desktop-browser",
|
|
34
34
|
dom: props.container
|
|
35
35
|
}));
|
|
36
36
|
chartContext.current = Object.assign(Object.assign({}, chartContext.current), {
|
|
37
37
|
chart: cs
|
|
38
38
|
});
|
|
39
|
-
})(props),
|
|
40
|
-
|
|
39
|
+
})(props), (() => {
|
|
40
|
+
if (chartContext.current.chart) {
|
|
41
|
+
const renderPromise = chartContext.current.chart.renderAsync().then(handleChartRender);
|
|
42
|
+
props.onError && renderPromise.catch(props.onError);
|
|
43
|
+
}
|
|
44
|
+
})(), bindEventsToChart(chartContext.current.chart, props, null, CHART_EVENTS),
|
|
45
|
+
chartContext.current = Object.assign(Object.assign({}, chartContext.current), {
|
|
41
46
|
isChildrenUpdated: !1
|
|
42
47
|
}), void (eventsBinded.current = props);
|
|
43
|
-
if (
|
|
44
|
-
|
|
48
|
+
if (hasSpec) {
|
|
49
|
+
if (!isEqual(eventsBinded.current.spec, props.spec, {
|
|
50
|
+
skipFunction: skipFunctionDiff
|
|
51
|
+
})) {
|
|
52
|
+
eventsBinded.current = props;
|
|
53
|
+
const updatePromise = chartContext.current.chart.updateSpec(parseSpec(props), void 0, {
|
|
54
|
+
morph: !1,
|
|
55
|
+
enableExitAnimation: !1
|
|
56
|
+
}).then(handleChartRender);
|
|
57
|
+
props.onError && updatePromise.catch(props.onError);
|
|
58
|
+
}
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
45
61
|
const newSpec = pickWithout(props, notSpecKeys);
|
|
46
|
-
isEqual(newSpec, prevSpec.current
|
|
47
|
-
|
|
62
|
+
if (!isEqual(newSpec, prevSpec.current, {
|
|
63
|
+
skipFunction: skipFunctionDiff
|
|
64
|
+
}) || chartContext.current.isChildrenUpdated) {
|
|
65
|
+
prevSpec.current = newSpec;
|
|
66
|
+
const updatePromise = chartContext.current.chart.updateSpec(parseSpec(props), void 0, {
|
|
67
|
+
morph: !1,
|
|
68
|
+
enableExitAnimation: !1
|
|
69
|
+
}).then(handleChartRender);
|
|
70
|
+
props.onError && updatePromise.catch(props.onError);
|
|
71
|
+
}
|
|
48
72
|
chartContext.current = Object.assign(Object.assign({}, chartContext.current), {
|
|
49
73
|
isChildrenUpdated: !1
|
|
50
74
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/BaseChart.tsx"],"names":[],"mappings":"AAAA,OAAO,MAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,aAAiC,MAAM,6BAA6B,CAAC;AAC5E,OAAO,gBAAsC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAe,iBAAiB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA2BjG,MAAM,WAAW,GAAG,CAAC,GAAG,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;AAEnG,MAAM,SAAS,GAAoB,KAAK,CAAC,UAAU,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACjE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAS,CAAC,CAAC,CAAC;IACpD,MAAM,YAAY,GAAG,MAAM,CAAmB;QAC5C,gBAAgB,EAAE,EAAE;KACrB,CAAC,CAAC;IAEH,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,K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AAE,QAAQ;aACnB,CAAC,CACa,CAClB,CAAC;QACJ,CAAC,CAAC,CACmB,CACG,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAkB,aAAqB,EAAE,IAAa,EAAE,QAA0B,EAAE,EAAE;IAC/G,MAAM,GAAG,GAAG,aAAa,CAAoB,SAAgB,EAAE,aAAa,EAAE,CAAC,KAAU,EAAE,EAAE;QAC3F,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAElB,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;SACxB;QAED,IAAI,IAAI,EAAE;YACR,uCAAY,KAAK,KAAE,IAAI,IAAG;SAC3B;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC","file":"BaseChart.js","sourcesContent":["import VChart, { IData, IInitOption } from '@visactor/vchart';\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react';\nimport withContainer, { ContainerProps } from '../containers/withContainer';\nimport RootChartContext, { ChartContextType } from '../context/chart';\nimport type { IView } from '@visactor/vgrammar';\nimport { isEqual, pickWithout } from '@visactor/vutils';\nimport ViewContext from '../context/view';\nimport { toArray } from '../util';\nimport { REACT_PRIVATE_PROPS } from '../constants';\nimport { IMarkElement } from '../components';\nimport { bindEventsToChart, EventsProps, CHART_EVENTS_KEYS, CHART_EVENTS } from '../eventsUtils';\n\nexport type ChartOptions = Omit<IInitOption, 'dom'>;\n\nexport interface BaseChartProps extends EventsProps {\n type?: string;\n /** 上层container */\n container?: HTMLDivElement;\n /**\n * used only by <VChart />\n */\n spec?: any;\n /** 数据 */\n data?: IData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /** 图表配置 */\n options?: ChartOptions;\n\n /** 图表渲染完成事件 */\n onReady?: (instance: VChart, isInitial: boolean) => void;\n}\n\ntype Props = React.PropsWithChildren<BaseChartProps>;\n\nconst notSpecKeys = [...REACT_PRIVATE_PROPS, ...CHART_EVENTS_KEYS, 'spec', 'container', 'options'];\n\nconst BaseChart: React.FC<Props> = React.forwardRef((props, ref) => {\n const [updateId, setUpdateId] = useState<number>(0);\n const chartContext = useRef<ChartContextType>({\n specFromChildren: {}\n });\n\n useImperativeHandle(ref, () => chartContext.current.chart);\n\n const hasSpec = !!props.spec;\n const [view, setView] = useState<IView>(null);\n const isUnmount = useRef<boolean>(false);\n const prevSpec = useRef(pickWithout(props, notSpecKeys));\n const eventsBinded = React.useRef<BaseChartProps>(null);\n\n const parseSpec = (props: Props) => {\n if (hasSpec && props.spec) {\n return props.spec;\n }\n\n return {\n ...prevSpec.current,\n ...chartContext.current.specFromChildren\n };\n };\n\n const createChart = (props: Props) => {\n const cs = new VChart(parseSpec(props), {\n ...props.options,\n autoFit: true,\n mode: 'desktop-browser',\n dom: props.container\n });\n chartContext.current = { ...chartContext.current, chart: cs };\n };\n\n const handleChartRender = () => {\n const newView = chartContext.current.chart.getCompiler().getVGrammarView();\n if (newView !== view && !isUnmount.current) {\n setUpdateId(updateId + 1);\n if (props.onReady) {\n props.onReady(chartContext.current.chart, updateId === 0);\n }\n }\n setView(newView);\n };\n\n const renderChart = () => {\n if (chartContext.current.chart) {\n // eslint-disable-next-line promise/catch-or-return\n chartContext.current.chart.renderAsync().then(handleChartRender);\n }\n };\n\n useEffect(() => {\n if (!chartContext.current.chart) {\n createChart(props);\n renderChart();\n bindEventsToChart(chartContext.current.chart, props, null, CHART_EVENTS);\n chartContext.current = {\n ...chartContext.current,\n isChildrenUpdated: false\n };\n eventsBinded.current = props;\n return;\n }\n\n bindEventsToChart(chartContext.current.chart, props, eventsBinded.current, CHART_EVENTS);\n\n if (hasSpec) {\n if (!isEqual(eventsBinded.current.spec, props.spec)) {\n // eslint-disable-next-line promise/catch-or-return\n chartContext.current.chart.updateSpec(parseSpec(props)).then(handleChartRender);\n }\n return;\n }\n\n const newSpec = pickWithout(props, notSpecKeys);\n\n if (!isEqual(newSpec, prevSpec.current) || chartContext.current.isChildrenUpdated) {\n prevSpec.current = newSpec;\n // eslint-disable-next-line promise/catch-or-return\n chartContext.current.chart.updateSpec(parseSpec(props)).then(handleChartRender);\n }\n chartContext.current = {\n ...chartContext.current,\n isChildrenUpdated: false\n };\n }, [props]);\n\n useEffect(() => {\n return () => {\n if (chartContext) {\n if (chartContext.current.chart) {\n chartContext.current.chart.release();\n }\n chartContext.current = null;\n }\n isUnmount.current = true;\n };\n }, []);\n\n return (\n <RootChartContext.Provider value={chartContext.current}>\n <ViewContext.Provider value={view}>\n {toArray(props.children).map((child, index) => {\n return (\n <React.Fragment key={(child as any)?.props?.id ?? (child as any)?.id ?? `child-${index}`}>\n {React.cloneElement(child as IMarkElement, {\n updateId: updateId\n })}\n </React.Fragment>\n );\n })}\n </ViewContext.Provider>\n </RootChartContext.Provider>\n );\n});\n\nexport const createChart = <T extends Props>(componentName: string, type?: string, callback?: (props: T) => T) => {\n const Com = withContainer<ContainerProps, T>(BaseChart as any, componentName, (props: any) => {\n props.type = type;\n\n if (callback) {\n return callback(props);\n }\n\n if (type) {\n return { ...props, type };\n }\n return props;\n });\n Com.displayName = componentName;\n return Com;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["charts/BaseChart.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAqC,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,aAAiC,MAAM,6BAA6B,CAAC;AAC5E,OAAO,gBAAsC,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS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C,KAAqB,EAAE;gBACzC,QAAQ,EAAE,QAAQ;aACnB,CAAC,CACa,CAClB,CAAC;QACJ,CAAC,CAAC,CACmB,CACG,CAC7B,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAkB,aAAqB,EAAE,IAAa,EAAE,QAA0B,EAAE,EAAE;IAC/G,MAAM,GAAG,GAAG,aAAa,CAAoB,SAAgB,EAAE,aAAa,EAAE,CAAC,KAAQ,EAAE,EAAE;QACzF,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;QAElB,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;SACxB;QAED,IAAI,IAAI,EAAE;YACR,uCAAY,KAAK,KAAE,IAAI,IAAG;SAC3B;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,OAAO,GAAG,CAAC;AACb,CAAC,CAAC","file":"BaseChart.js","sourcesContent":["import VChart, { IData, IInitOption, ISpec } from '@visactor/vchart';\nimport React, { useState, useEffect, useRef, useImperativeHandle } from 'react';\nimport withContainer, { ContainerProps } from '../containers/withContainer';\nimport RootChartContext, { ChartContextType } from '../context/chart';\nimport type { IView } from '@visactor/vgrammar-core';\nimport { isEqual, pickWithout } from '@visactor/vutils';\nimport ViewContext from '../context/view';\nimport { toArray } from '../util';\nimport { REACT_PRIVATE_PROPS } from '../constants';\nimport { IMarkElement } from '../components';\nimport {\n bindEventsToChart,\n EventsProps,\n CHART_EVENTS_KEYS,\n CHART_EVENTS,\n LegendEventProps,\n ScrollBarEventProps,\n BrushEventProps,\n DataZoomEventProps,\n PlayerEventProps,\n DimensionEventProps,\n HierarchyEventProps,\n ChartLifeCycleEventProps\n} from '../eventsUtils';\n\nexport type ChartOptions = Omit<IInitOption, 'dom'>;\n\nexport interface BaseChartProps\n extends EventsProps,\n LegendEventProps,\n ScrollBarEventProps,\n BrushEventProps,\n DataZoomEventProps,\n PlayerEventProps,\n DimensionEventProps,\n HierarchyEventProps,\n ChartLifeCycleEventProps {\n type?: string;\n /** 上层container */\n container?: HTMLDivElement;\n /**\n * used only by <VChart />\n */\n spec?: ISpec;\n /** 数据 */\n data?: IData;\n /** 画布宽度 */\n width?: number;\n /** 画布高度 */\n height?: number;\n /** 图表配置 */\n options?: ChartOptions;\n /** skip function diff when component update */\n skipFunctionDiff?: boolean;\n /** 图表渲染完成事件 */\n onReady?: (instance: VChart, isInitial: boolean) => void;\n /** throw error when chart run into an error */\n onError?: (err: Error) => void;\n}\n\ntype Props = React.PropsWithChildren<BaseChartProps>;\n\nconst notSpecKeys = [\n ...REACT_PRIVATE_PROPS,\n ...CHART_EVENTS_KEYS,\n 'skipFunctionDiff',\n 'onError',\n 'onReady',\n 'spec',\n 'container',\n 'options'\n];\n\nconst BaseChart: React.FC<Props> = React.forwardRef((props, ref) => {\n const [updateId, setUpdateId] = useState<number>(0);\n const chartContext = useRef<ChartContextType>({\n specFromChildren: {}\n });\n useImperativeHandle(ref, () => chartContext.current.chart);\n const hasSpec = !!props.spec;\n const [view, setView] = useState<IView>(null);\n const isUnmount = useRef<boolean>(false);\n const prevSpec = useRef(pickWithout(props, notSpecKeys));\n const eventsBinded = React.useRef<BaseChartProps>(null);\n const skipFunctionDiff = !!props.skipFunctionDiff;\n\n const parseSpec = (props: Props) => {\n if (hasSpec && props.spec) {\n return props.spec;\n }\n\n return {\n ...prevSpec.current,\n ...chartContext.current.specFromChildren\n };\n };\n\n const createChart = (props: Props) => {\n const cs = new VChart(parseSpec(props), {\n ...props.options,\n autoFit: true,\n dom: props.container\n });\n chartContext.current = { ...chartContext.current, chart: cs };\n };\n\n const handleChartRender = () => {\n // rebind events after render\n bindEventsToChart(chartContext.current.chart, props, eventsBinded.current, CHART_EVENTS);\n\n const newView = chartContext.current.chart.getCompiler().getVGrammarView();\n if (!isUnmount.current) {\n setUpdateId(updateId + 1);\n if (props.onReady) {\n props.onReady(chartContext.current.chart, updateId === 0);\n }\n }\n setView(newView);\n };\n\n const renderChart = () => {\n if (chartContext.current.chart) {\n // eslint-disable-next-line promise/catch-or-return\n const renderPromise = chartContext.current.chart.renderAsync().then(handleChartRender);\n\n if (props.onError) {\n renderPromise.catch(props.onError);\n }\n }\n };\n\n useEffect(() => {\n if (!chartContext.current.chart) {\n createChart(props);\n renderChart();\n bindEventsToChart(chartContext.current.chart, props, null, CHART_EVENTS);\n chartContext.current = {\n ...chartContext.current,\n isChildrenUpdated: false\n };\n eventsBinded.current = props;\n return;\n }\n\n if (hasSpec) {\n if (!isEqual(eventsBinded.current.spec, props.spec, { skipFunction: skipFunctionDiff })) {\n eventsBinded.current = props;\n // eslint-disable-next-line promise/catch-or-return\n const updatePromise = chartContext.current.chart\n .updateSpec(parseSpec(props), undefined, { morph: false, enableExitAnimation: false }) // morph临时关掉\n .then(handleChartRender);\n\n if (props.onError) {\n updatePromise.catch(props.onError);\n }\n }\n return;\n }\n\n const newSpec = pickWithout(props, notSpecKeys);\n\n if (\n !isEqual(newSpec, prevSpec.current, { skipFunction: skipFunctionDiff }) ||\n chartContext.current.isChildrenUpdated\n ) {\n prevSpec.current = newSpec;\n // eslint-disable-next-line promise/catch-or-return\n const updatePromise = chartContext.current.chart\n .updateSpec(parseSpec(props), undefined, { morph: false, enableExitAnimation: false }) // morph临时关掉\n .then(handleChartRender);\n\n if (props.onError) {\n updatePromise.catch(props.onError);\n }\n }\n chartContext.current = {\n ...chartContext.current,\n isChildrenUpdated: false\n };\n }, [props]);\n\n useEffect(() => {\n return () => {\n if (chartContext) {\n if (chartContext.current.chart) {\n chartContext.current.chart.release();\n }\n chartContext.current = null;\n }\n isUnmount.current = true;\n };\n }, []);\n\n return (\n <RootChartContext.Provider value={chartContext.current}>\n <ViewContext.Provider value={view}>\n {toArray(props.children).map((child, index) => {\n return (\n <React.Fragment key={(child as any)?.props?.id ?? (child as any)?.id ?? `child-${index}`}>\n {React.cloneElement(child as IMarkElement, {\n updateId: updateId\n })}\n </React.Fragment>\n );\n })}\n </ViewContext.Provider>\n </RootChartContext.Provider>\n );\n});\n\nexport const createChart = <T extends Props>(componentName: string, type?: string, callback?: (props: T) => T) => {\n const Com = withContainer<ContainerProps, T>(BaseChart as any, componentName, (props: T) => {\n props.type = type;\n\n if (callback) {\n return callback(props);\n }\n\n if (type) {\n return { ...props, type };\n }\n return props;\n });\n Com.displayName = componentName;\n return Com;\n};\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IBoxPlotChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface BoxPlotChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IBoxPlotChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const BoxPlotChart:
|
|
6
|
+
export declare const BoxPlotChart: React.ForwardRefExoticComponent<BoxPlotChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/BoxPlotChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/BoxPlotChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CAA6C,cAAc,EAAE,SAAS,CAAC,CAAC","file":"BoxPlotChart.js","sourcesContent":["import React from 'react';\nimport { IBoxPlotChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface BoxPlotChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IBoxPlotChartSpec, 'type'> {}\n\nexport const BoxPlotChart = createChart<React.PropsWithChildren<BoxPlotChartProps>>('BoxPlotChart', 'boxPlot');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ICircularProgressChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface CircularProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ICircularProgressChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const CircularProgressChart:
|
|
6
|
+
export declare const CircularProgressChart: React.ForwardRefExoticComponent<CircularProgressChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/CircularProgressChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/CircularProgressChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,qBAAqB,GAAG,WAAW,CAC9C,uBAAuB,EACvB,kBAAkB,CACnB,CAAC","file":"CircularProgressChart.js","sourcesContent":["import React from 'react';\nimport { ICircularProgressChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface CircularProgressChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ICircularProgressChartSpec, 'type'> {}\n\nexport const CircularProgressChart = createChart<React.PropsWithChildren<CircularProgressChartProps>>(\n 'CircularProgressChart',\n 'circularProgress'\n);\n"]}
|