@visactor/react-vchart 0.0.1-alpha.2 → 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.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.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.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 +2 -1
- 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.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.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.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 +2 -1
- 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
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ICommonChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface CommonChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ICommonChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const CommonChart:
|
|
6
|
+
export declare const CommonChart: React.ForwardRefExoticComponent<CommonChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/CommonChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/CommonChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAA4C,aAAa,EAAE,QAAQ,CAAC,CAAC","file":"CommonChart.js","sourcesContent":["import React from 'react';\nimport { ICommonChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface CommonChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ICommonChartSpec, 'type'> {}\n\nexport const CommonChart = createChart<React.PropsWithChildren<CommonChartProps>>('CommonChart', 'common');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IFunnelChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface FunnelChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IFunnelChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const FunnelChart:
|
|
6
|
+
export declare const FunnelChart: React.ForwardRefExoticComponent<FunnelChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/FunnelChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/FunnelChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,WAAW,GAAG,WAAW,CAA4C,aAAa,EAAE,QAAQ,CAAC,CAAC","file":"FunnelChart.js","sourcesContent":["import React from 'react';\nimport { IFunnelChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface FunnelChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IFunnelChartSpec, 'type'> {}\n\nexport const FunnelChart = createChart<React.PropsWithChildren<FunnelChartProps>>('FunnelChart', 'funnel');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IHistogramChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface HistogramChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IHistogramChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const HistogramChart:
|
|
6
|
+
export declare const HistogramChart: React.ForwardRefExoticComponent<HistogramChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/HistogramChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/HistogramChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAA+C,gBAAgB,EAAE,WAAW,CAAC,CAAC","file":"HistogramChart.js","sourcesContent":["import React from 'react';\nimport { IHistogramChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface HistogramChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IHistogramChartSpec, 'type'> {}\n\nexport const HistogramChart = createChart<React.PropsWithChildren<HistogramChartProps>>('HistogramChart', 'histogram');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ILineChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface LineChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ILineChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const LineChart:
|
|
6
|
+
export declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/LineChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/LineChart.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":"LineChart.js","sourcesContent":["import React from 'react';\nimport { ILineChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface LineChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ILineChartSpec, 'type'> {}\n\nexport const LineChart = createChart<React.PropsWithChildren<LineChartProps>>('LineChart', 'line');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ILinearProgressChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface LinearProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ILinearProgressChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const LinearProgressChart:
|
|
6
|
+
export declare const LinearProgressChart: React.ForwardRefExoticComponent<LinearProgressChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/LinearProgressChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/LinearProgressChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAC5C,qBAAqB,EACrB,gBAAgB,CACjB,CAAC","file":"LinearProgressChart.js","sourcesContent":["import React from 'react';\nimport { ILinearProgressChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface LinearProgressChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ILinearProgressChartSpec, 'type'> {}\n\nexport const LinearProgressChart = createChart<React.PropsWithChildren<LinearProgressChartProps>>(\n 'LinearProgressChart',\n 'linearProgress'\n);\n"]}
|
package/esm/charts/MapChart.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IMapChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface MapChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IMapChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const MapChart:
|
|
6
|
+
export declare const MapChart: React.ForwardRefExoticComponent<MapChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/MapChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/MapChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAyC,UAAU,EAAE,KAAK,CAAC,CAAC","file":"MapChart.js","sourcesContent":["import React from 'react';\nimport { IMapChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface MapChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IMapChartSpec, 'type'> {}\n\nexport const MapChart = createChart<React.PropsWithChildren<MapChartProps>>('MapChart', 'map');\n"]}
|
package/esm/charts/PieChart.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IPieChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface PieChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IPieChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const PieChart:
|
|
6
|
+
export declare const PieChart: React.ForwardRefExoticComponent<PieChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/PieChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/PieChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAyC,UAAU,EAAE,KAAK,CAAC,CAAC","file":"PieChart.js","sourcesContent":["import React from 'react';\nimport { IPieChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface PieChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IPieChartSpec, 'type'> {}\n\nexport const PieChart = createChart<React.PropsWithChildren<PieChartProps>>('PieChart', 'pie');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IRadarChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface RadarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRadarChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const RadarChart:
|
|
6
|
+
export declare const RadarChart: React.ForwardRefExoticComponent<RadarChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RadarChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/RadarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA2C,YAAY,EAAE,OAAO,CAAC,CAAC","file":"RadarChart.js","sourcesContent":["import React from 'react';\nimport { IRadarChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RadarChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRadarChartSpec, 'type'> {}\n\nexport const RadarChart = createChart<React.PropsWithChildren<RadarChartProps>>('RadarChart', 'radar');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IRangeColumnChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface RangeColumnChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRangeColumnChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const RangeColumnChart:
|
|
6
|
+
export declare const RangeColumnChart: React.ForwardRefExoticComponent<RangeColumnChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RangeColumnChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/RangeColumnChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CACzC,kBAAkB,EAClB,aAAa,CACd,CAAC","file":"RangeColumnChart.js","sourcesContent":["import React from 'react';\nimport { IRangeColumnChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RangeColumnChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRangeColumnChartSpec, 'type'> {}\n\nexport const RangeColumnChart = createChart<React.PropsWithChildren<RangeColumnChartProps>>(\n 'RangeColumnChart',\n 'rangeColumn'\n);\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IRoseChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface RoseChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRoseChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const RoseChart:
|
|
6
|
+
export declare const RoseChart: React.ForwardRefExoticComponent<RoseChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RoseChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/RoseChart.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":"RoseChart.js","sourcesContent":["import React from 'react';\nimport { IRoseChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RoseChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRoseChartSpec, 'type'> {}\n\nexport const RoseChart = createChart<React.PropsWithChildren<RoseChartProps>>('RoseChart', 'rose');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IScatterChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface ScatterChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IScatterChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const ScatterChart:
|
|
6
|
+
export declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/ScatterChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/ScatterChart.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":"ScatterChart.js","sourcesContent":["import React from 'react';\nimport { IScatterChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface ScatterChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IScatterChartSpec, 'type'> {}\n\nexport const ScatterChart = createChart<React.PropsWithChildren<ScatterChartProps>>('ScatterChart', 'scatter');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ISequenceChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface SequenceChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ISequenceChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const SequenceChart:
|
|
6
|
+
export declare const SequenceChart: React.ForwardRefExoticComponent<SequenceChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/SequenceChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/SequenceChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAA8C,eAAe,EAAE,UAAU,CAAC,CAAC","file":"SequenceChart.js","sourcesContent":["import React from 'react';\nimport { ISequenceChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface SequenceChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ISequenceChartSpec, 'type'> {}\n\nexport const SequenceChart = createChart<React.PropsWithChildren<SequenceChartProps>>('SequenceChart', 'sequence');\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { IWordCloudChartSpec } from '@visactor/vchart';
|
|
2
3
|
import { BaseChartProps } from './BaseChart';
|
|
3
4
|
export interface WordCloudChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IWordCloudChartSpec, 'type'> {
|
|
4
5
|
}
|
|
5
|
-
export declare const WordCloudChart:
|
|
6
|
+
export declare const WordCloudChart: React.ForwardRefExoticComponent<WordCloudChartProps & {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/WordCloudChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/WordCloudChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CAA+C,gBAAgB,EAAE,WAAW,CAAC,CAAC","file":"WordCloudChart.js","sourcesContent":["import React from 'react';\nimport { IWordCloudChartSpec } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface WordCloudChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IWordCloudChartSpec, 'type'> {}\n\nexport const WordCloudChart = createChart<React.PropsWithChildren<WordCloudChartProps>>('WordCloudChart', 'wordCloud');\n"]}
|
package/esm/charts/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
1
|
+
export * from './AreaChart';
|
|
2
|
+
export * from './BarChart';
|
|
3
|
+
export * from './LineChart';
|
|
4
|
+
export * from './ScatterChart';
|
|
5
|
+
export * from './PieChart';
|
|
6
|
+
export * from './RoseChart';
|
|
7
|
+
export * from './RadarChart';
|
|
8
|
+
export * from './MapChart';
|
|
9
|
+
export * from './HistogramChart';
|
|
10
|
+
export * from './WordCloudChart';
|
|
11
|
+
export * from './FunnelChart';
|
|
12
|
+
export * from './BoxPlotChart';
|
|
13
|
+
export * from './CircularProgressChart';
|
|
14
|
+
export * from './LinearProgressChart';
|
|
15
|
+
export * from './RangeColumnChart';
|
|
16
|
+
export * from './CommonChart';
|
|
17
|
+
export type { ChartOptions } from './BaseChart';
|
|
18
|
+
export type { IData, IChartSpec } from '@visactor/vchart';
|
package/esm/charts/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./AreaChart";
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export * from "./BarChart";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export * from "./LineChart";
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export * from "./ScatterChart";
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export * from "./PieChart";
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export * from "./RoseChart";
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export * from "./RadarChart";
|
|
14
14
|
|
|
15
|
-
export
|
|
15
|
+
export * from "./MapChart";
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export * from "./HistogramChart";
|
|
18
18
|
|
|
19
|
-
export
|
|
19
|
+
export * from "./WordCloudChart";
|
|
20
20
|
|
|
21
|
-
export
|
|
21
|
+
export * from "./FunnelChart";
|
|
22
22
|
|
|
23
|
-
export
|
|
23
|
+
export * from "./BoxPlotChart";
|
|
24
24
|
|
|
25
|
-
export
|
|
25
|
+
export * from "./CircularProgressChart";
|
|
26
26
|
|
|
27
|
-
export
|
|
27
|
+
export * from "./LinearProgressChart";
|
|
28
28
|
|
|
29
|
-
export
|
|
29
|
+
export * from "./RangeColumnChart";
|
|
30
30
|
|
|
31
|
-
export
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
31
|
+
export * from "./CommonChart";
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
package/esm/charts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"sources":["charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAE7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './AreaChart';\nexport * from './BarChart';\nexport * from './LineChart';\nexport * from './ScatterChart';\n\nexport * from './PieChart';\nexport * from './RoseChart';\n\nexport * from './RadarChart';\n\nexport * from './MapChart';\nexport * from './HistogramChart';\nexport * from './WordCloudChart';\nexport * from './FunnelChart';\nexport * from './BoxPlotChart';\n\nexport * from './CircularProgressChart';\nexport * from './LinearProgressChart';\nexport * from './RangeColumnChart';\n\nexport * from './CommonChart';\n\nexport type { ChartOptions } from './BaseChart';\nexport type { IData, IChartSpec } from '@visactor/vchart';\n"]}
|
package/esm/components/Axis.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
}
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}>;
|
|
1
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
2
|
+
import type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';
|
|
3
|
+
export type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;
|
|
4
|
+
export declare const Axis: import("react").FC<AxisProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"sources":["components/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAY,MAAM,EAAE,MAAM,CAAC,CAAC","file":"Axis.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';\n\nexport type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;\n\nexport const Axis = createComponent<AxisProps>('Axis', 'axes');\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from "react";
|
|
2
2
|
|
|
3
|
-
import { isNil, pickWithout } from "@visactor/vutils";
|
|
3
|
+
import { isEqual, isNil, pickWithout } from "@visactor/vutils";
|
|
4
4
|
|
|
5
5
|
import RootChartContext from "../context/chart";
|
|
6
6
|
|
|
@@ -10,10 +10,16 @@ import { uid } from "../util";
|
|
|
10
10
|
|
|
11
11
|
export const createComponent = (componentName, specName, supportedEvents, isSingle) => {
|
|
12
12
|
const ignoreKeys = [ "id", "updateId" ], notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys, Comp = props => {
|
|
13
|
-
const context = useContext(RootChartContext), id = React.useRef(isNil(props.id) ? uid(specName) : props.id), eventsBinded = React.useRef(null), updateId = React.useRef(props.updateId), componentSpec =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const context = useContext(RootChartContext), id = React.useRef(isNil(props.id) ? uid(specName) : props.id), eventsBinded = React.useRef(null), updateId = React.useRef(props.updateId), componentSpec = React.useRef();
|
|
14
|
+
if (props.updateId !== updateId.current) {
|
|
15
|
+
updateId.current = props.updateId;
|
|
16
|
+
!!supportedEvents && bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents) && (eventsBinded.current = props);
|
|
17
|
+
} else {
|
|
18
|
+
const newComponentSpec = pickWithout(props, notSpecKeys);
|
|
19
|
+
isEqual(newComponentSpec, componentSpec.current) || (componentSpec.current = newComponentSpec,
|
|
20
|
+
updateToContext(context, id.current, specName, isSingle, newComponentSpec));
|
|
21
|
+
}
|
|
22
|
+
return useEffect((() => () => {
|
|
17
23
|
supportedEvents && bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents),
|
|
18
24
|
deleteToContext(context, id.current, specName, isSingle);
|
|
19
25
|
}), []), null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/BaseComponent.tsx"],"names":[],"mappings":"AAAA,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AK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAE/D,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;YAE1E,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;YAC9C,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;SAClC;KACF;AACH,CAAC,CAAC","file":"BaseComponent.js","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport { isEqual, isNil, pickWithout } from '@visactor/vutils';\n\nimport RootChartContext, { ChartContextType } from '../context/chart';\nimport { bindEventsToChart } from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseComponentProps {\n id?: string | number;\n}\n\ntype ComponentProps = BaseComponentProps & { updateId?: number };\n\nexport const createComponent = <T extends ComponentProps>(\n componentName: string,\n specName: string,\n supportedEvents?: Record<string, string> | null,\n isSingle?: boolean\n) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys;\n\n const Comp: React.FC<T> = (props: T) => {\n const context = useContext(RootChartContext);\n const id = React.useRef<string | number>(isNil(props.id) ? uid(specName) : props.id);\n\n const eventsBinded = React.useRef<T>(null);\n const updateId = React.useRef<number>(props.updateId);\n const componentSpec = React.useRef<Partial<T>>();\n\n if (props.updateId !== updateId.current) {\n // update triggered by chart when chart is rendered\n updateId.current = props.updateId;\n\n // rebind events after chart render\n const hasPrevEventsBinded = supportedEvents\n ? bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents)\n : false;\n if (hasPrevEventsBinded) {\n eventsBinded.current = props;\n }\n } else {\n const newComponentSpec: Partial<T> = pickWithout<T>(props, notSpecKeys);\n\n if (!isEqual(newComponentSpec, componentSpec.current)) {\n componentSpec.current = newComponentSpec;\n updateToContext(context, id.current, specName, isSingle, newComponentSpec);\n }\n }\n\n useEffect(() => {\n return () => {\n if (supportedEvents) {\n bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);\n }\n deleteToContext(context, id.current, specName, isSingle);\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n\nconst updateToContext = (\n context: ChartContextType,\n id: string | number,\n specName: string,\n isSingle: boolean,\n props: Partial<ComponentProps>\n) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = { ...props };\n } else {\n if (!context.specFromChildren[specName]) {\n context.specFromChildren[specName] = [];\n }\n\n const comps = context.specFromChildren[specName];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n comps[index] = {\n id,\n ...props\n };\n } else {\n context.specFromChildren[specName].push({\n id,\n ...props\n });\n }\n }\n context.isChildrenUpdated = true;\n};\n\nconst deleteToContext = (context: ChartContextType, id: string | number, specName: string, isSingle: boolean) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = null;\n } else {\n const comps = context.specFromChildren[specName] ?? [];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n const newComps = comps.slice(0, index - 1).concat(comps.slice(index + 1));\n\n context.specFromChildren[specName] = newComps;\n context.isChildrenUpdated = true;\n }\n }\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BrushEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IBrushSpec } from '@visactor/vchart';
|
|
4
|
+
export type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;
|
|
5
|
+
export declare const Brush: import("react").FC<BrushProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Brush.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAmB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAa,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC","file":"Brush.js","sourcesContent":["import { BRUSH_CUSTOMIZED_EVENTS, BrushEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IBrushSpec } from '@visactor/vchart';\n\nexport type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;\n\nexport const Brush = createComponent<BrushProps>('Brush', 'brush', BRUSH_CUSTOMIZED_EVENTS, true);\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
2
|
+
import type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';
|
|
3
|
+
export type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;
|
|
4
|
+
export declare const Crosshair: import("react").FC<CrosshairProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Crosshair.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,CAAC,CAAC","file":"Crosshair.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';\n\nexport type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;\n\nexport const Crosshair = createComponent<CrosshairProps>('Crosshair', 'crosshair');\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataZoomEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IDataZoomSpec } from '@visactor/vchart';
|
|
4
|
+
export type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;
|
|
5
|
+
export declare const DataZoom: import("react").FC<DataZoomProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/DataZoom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAsB,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAgB,UAAU,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC","file":"DataZoom.js","sourcesContent":["import { DATAZOOM_CUSTOMIZED_EVENTS, DataZoomEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IDataZoomSpec } from '@visactor/vchart';\n\nexport type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;\nexport const DataZoom = createComponent<DataZoomProps>('DataZoom', 'dataZoom', DATAZOOM_CUSTOMIZED_EVENTS);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Indicator.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IIndicatorSpec } from '@visactor/vchart';\n\nexport type IndicatorProps = IIndicatorSpec & BaseComponentProps;\n\nexport const Indicator = createComponent<IndicatorProps>('Indicator', 'indicator', null, true);\n"]}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import type { IDiscreteLegendSpec } from '@visactor/vchart';
|
|
2
|
+
import { LegendEventProps } from '../eventsUtils';
|
|
1
3
|
import { BaseComponentProps } from './BaseComponent';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
onLegendItemUnHover: (e: any) => void;
|
|
5
|
-
onLegendItemClick: (e: any) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const Legend: import("react").FC<BaseComponentProps & {
|
|
8
|
-
updateId?: number;
|
|
9
|
-
}>;
|
|
4
|
+
export type LegendProps = BaseComponentProps & IDiscreteLegendSpec & LegendEventProps;
|
|
5
|
+
export declare const Legend: import("react").FC<LegendProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Legend.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"sources":["components/Legend.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAoB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAc,QAAQ,EAAE,SAAS,EAAE,wBAAwB,CAAC,CAAC","file":"Legend.js","sourcesContent":["import type { IDiscreteLegendSpec } from '@visactor/vchart';\nimport { LEGEND_CUSTOMIZED_EVENTS, LegendEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport type LegendProps = BaseComponentProps & IDiscreteLegendSpec & LegendEventProps;\n\nexport const Legend = createComponent<LegendProps>('Legend', 'legends', LEGEND_CUSTOMIZED_EVENTS);\n"]}
|
package/esm/components/Mark.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { MarkSpec } from '@visactor/vgrammar';
|
|
2
|
+
import type { MarkSpec } from '@visactor/vgrammar-core';
|
|
3
3
|
export interface MarkProps extends Omit<MarkSpec, 'name' | 'id'> {
|
|
4
4
|
id?: string | number;
|
|
5
5
|
glyphType?: string;
|
|
@@ -8,7 +8,7 @@ export interface IMarkElement extends React.ReactElement<Props, React.JSXElement
|
|
|
8
8
|
id: string | number;
|
|
9
9
|
}
|
|
10
10
|
type Props = MarkProps & {
|
|
11
|
-
updateId
|
|
11
|
+
updateId?: number;
|
|
12
12
|
};
|
|
13
13
|
export declare const Mark: React.FC<Props>;
|
|
14
14
|
export {};
|
package/esm/components/Mark.js
CHANGED
|
@@ -17,8 +17,9 @@ import ViewContext from "../context/view";
|
|
|
17
17
|
import { uid } from "../util";
|
|
18
18
|
|
|
19
19
|
export const Mark = props => {
|
|
20
|
-
const context = useContext(ViewContext), id = React.useRef(isNil(props.id) ? uid("mark") : props.id);
|
|
21
|
-
return
|
|
20
|
+
const context = useContext(ViewContext), id = React.useRef(isNil(props.id) ? uid("mark") : props.id), updateId = React.useRef(props.updateId);
|
|
21
|
+
return props.updateId !== updateId.current && (updateId.current = props.updateId,
|
|
22
|
+
context && addOrUpdateMark(context, id.current, props)), useEffect((() => () => {
|
|
22
23
|
context && removeMark(context, id.current);
|
|
23
24
|
}), []), null;
|
|
24
25
|
};
|