@visactor/react-vchart 0.0.1-alpha.2 → 0.10.0-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 +4 -2
- package/cjs/VChart.js +11 -3
- package/cjs/VChart.js.map +1 -1
- package/cjs/VChartSimple.d.ts +6 -0
- package/cjs/VChartSimple.js +10 -0
- package/cjs/VChartSimple.js.map +1 -0
- package/cjs/charts/AreaChart.d.ts +7 -2
- package/cjs/charts/AreaChart.js +11 -2
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +7 -2
- package/cjs/charts/BarChart.js +11 -2
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +10 -6
- package/cjs/charts/BaseChart.js +57 -34
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +6 -1
- package/cjs/charts/BoxPlotChart.js +11 -2
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +6 -1
- package/cjs/charts/CircularProgressChart.js +11 -2
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +6 -1
- package/cjs/charts/CommonChart.js +11 -2
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +6 -1
- package/cjs/charts/FunnelChart.js +11 -2
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +6 -1
- package/cjs/charts/HistogramChart.js +11 -2
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +7 -2
- package/cjs/charts/LineChart.js +11 -2
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +6 -1
- package/cjs/charts/LinearProgressChart.js +11 -2
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +7 -2
- package/cjs/charts/MapChart.js +11 -2
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +7 -2
- package/cjs/charts/PieChart.js +11 -2
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +7 -2
- package/cjs/charts/RadarChart.js +11 -2
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +7 -2
- package/cjs/charts/RangeColumnChart.js +11 -2
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +7 -2
- package/cjs/charts/RoseChart.js +11 -3
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +7 -2
- package/cjs/charts/ScatterChart.js +12 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +7 -2
- package/cjs/charts/SequenceChart.js +11 -2
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +7 -2
- package/cjs/charts/WordCloudChart.js +11 -2
- package/cjs/charts/WordCloudChart.js.map +1 -1
- package/cjs/charts/index.d.ts +18 -16
- package/cjs/charts/index.js +24 -146
- package/cjs/charts/index.js.map +1 -1
- package/cjs/components/Axis.d.ts +4 -5
- package/cjs/components/Axis.js.map +1 -1
- package/cjs/components/BaseComponent.d.ts +2 -1
- package/cjs/components/BaseComponent.js +14 -35
- package/cjs/components/BaseComponent.js.map +1 -1
- package/cjs/components/Brush.d.ts +5 -0
- package/cjs/components/Brush.js +10 -0
- package/cjs/components/Brush.js.map +1 -0
- package/cjs/components/Crosshair.d.ts +4 -0
- package/cjs/components/Crosshair.js +10 -0
- package/cjs/components/Crosshair.js.map +1 -0
- package/cjs/components/DataZoom.d.ts +5 -0
- package/cjs/components/DataZoom.js +10 -0
- package/cjs/components/DataZoom.js.map +1 -0
- package/cjs/components/Indicator.d.ts +4 -0
- package/cjs/components/Indicator.js +10 -0
- package/cjs/components/Indicator.js.map +1 -0
- package/cjs/components/Legend.d.ts +4 -8
- package/cjs/components/Legend.js.map +1 -1
- package/cjs/components/Mark.d.ts +4 -14
- package/cjs/components/Mark.js +2 -60
- package/cjs/components/Mark.js.map +1 -1
- package/cjs/components/MarkArea.d.ts +4 -0
- package/cjs/components/MarkArea.js +10 -0
- package/cjs/components/MarkArea.js.map +1 -0
- package/cjs/components/MarkLine.d.ts +4 -0
- package/cjs/components/MarkLine.js +10 -0
- package/cjs/components/MarkLine.js.map +1 -0
- package/cjs/components/MarkPoint.d.ts +4 -0
- package/cjs/components/MarkPoint.js +10 -0
- package/cjs/components/MarkPoint.js.map +1 -0
- package/cjs/components/Player.d.ts +5 -0
- package/cjs/components/Player.js +10 -0
- package/cjs/components/Player.js.map +1 -0
- package/cjs/components/Region.d.ts +4 -4
- package/cjs/components/Region.js +1 -2
- package/cjs/components/Region.js.map +1 -1
- package/cjs/components/ScrollBar.d.ts +5 -0
- package/cjs/components/ScrollBar.js +10 -0
- package/cjs/components/ScrollBar.js.map +1 -0
- package/cjs/components/Title.d.ts +4 -0
- package/cjs/components/Title.js +10 -0
- package/cjs/components/Title.js.map +1 -0
- package/cjs/components/Tooltip.d.ts +4 -0
- package/cjs/components/Tooltip.js +10 -0
- package/cjs/components/Tooltip.js.map +1 -0
- package/cjs/components/index.d.ts +11 -0
- package/cjs/components/index.js +8 -2
- package/cjs/components/index.js.map +1 -1
- package/cjs/constants.js +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/containers/withContainer.d.ts +2 -2
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/chart.d.ts +2 -3
- package/cjs/context/chart.js.map +1 -1
- package/cjs/context/stage.d.ts +2 -2
- package/cjs/context/stage.js.map +1 -1
- package/cjs/context/view.d.ts +2 -2
- package/cjs/context/view.js.map +1 -1
- package/cjs/eventsUtils.d.ts +148 -47
- package/cjs/eventsUtils.js +35 -5
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +4 -19
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +6 -5
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +6 -5
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.d.ts +2 -1
- package/cjs/series/BaseSeries.js +22 -49
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +6 -5
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +6 -5
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +6 -5
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +6 -5
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +6 -5
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +6 -5
- package/cjs/series/LinearProgress.js +1 -2
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +6 -5
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +6 -5
- package/cjs/series/Map.js +2 -1
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +6 -5
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +6 -5
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +6 -5
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +6 -5
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +6 -5
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +6 -6
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +6 -5
- package/cjs/series/WordCloud.js +1 -1
- package/cjs/series/WordCloud.js.map +1 -1
- package/cjs/series/index.js +1 -1
- package/cjs/series/index.js.map +1 -1
- package/cjs/util.js +1 -1
- package/cjs/util.js.map +1 -1
- package/esm/VChart.d.ts +4 -2
- package/esm/VChart.js +7 -1
- package/esm/VChart.js.map +1 -1
- package/esm/VChartSimple.d.ts +6 -0
- package/esm/VChartSimple.js +4 -0
- package/esm/VChartSimple.js.map +1 -0
- package/esm/charts/AreaChart.d.ts +7 -2
- package/esm/charts/AreaChart.js +6 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +7 -2
- package/esm/charts/BarChart.js +6 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +10 -6
- package/esm/charts/BaseChart.js +56 -35
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +6 -1
- package/esm/charts/BoxPlotChart.js +6 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +6 -1
- package/esm/charts/CircularProgressChart.js +6 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +6 -1
- package/esm/charts/CommonChart.js +6 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +6 -1
- package/esm/charts/FunnelChart.js +6 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +6 -1
- package/esm/charts/HistogramChart.js +6 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +7 -2
- package/esm/charts/LineChart.js +6 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +6 -1
- package/esm/charts/LinearProgressChart.js +6 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +7 -2
- package/esm/charts/MapChart.js +6 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +7 -2
- package/esm/charts/PieChart.js +6 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +7 -2
- package/esm/charts/RadarChart.js +6 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +7 -2
- package/esm/charts/RangeColumnChart.js +6 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +7 -2
- package/esm/charts/RoseChart.js +6 -2
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +7 -2
- package/esm/charts/ScatterChart.js +7 -1
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +7 -2
- package/esm/charts/SequenceChart.js +6 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +7 -2
- package/esm/charts/WordCloudChart.js +6 -1
- package/esm/charts/WordCloudChart.js.map +1 -1
- package/esm/charts/index.d.ts +18 -16
- package/esm/charts/index.js +17 -17
- package/esm/charts/index.js.map +1 -1
- package/esm/components/Axis.d.ts +4 -5
- package/esm/components/Axis.js.map +1 -1
- package/esm/components/BaseComponent.d.ts +2 -1
- package/esm/components/BaseComponent.js +14 -35
- package/esm/components/BaseComponent.js.map +1 -1
- package/esm/components/Brush.d.ts +5 -0
- package/esm/components/Brush.js +6 -0
- package/esm/components/Brush.js.map +1 -0
- package/esm/components/Crosshair.d.ts +4 -0
- package/esm/components/Crosshair.js +4 -0
- package/esm/components/Crosshair.js.map +1 -0
- package/esm/components/DataZoom.d.ts +5 -0
- package/esm/components/DataZoom.js +6 -0
- package/esm/components/DataZoom.js.map +1 -0
- package/esm/components/Indicator.d.ts +4 -0
- package/esm/components/Indicator.js +4 -0
- package/esm/components/Indicator.js.map +1 -0
- package/esm/components/Legend.d.ts +4 -8
- package/esm/components/Legend.js.map +1 -1
- package/esm/components/Mark.d.ts +4 -14
- package/esm/components/Mark.js +2 -38
- package/esm/components/Mark.js.map +1 -1
- package/esm/components/MarkArea.d.ts +4 -0
- package/esm/components/MarkArea.js +4 -0
- package/esm/components/MarkArea.js.map +1 -0
- package/esm/components/MarkLine.d.ts +4 -0
- package/esm/components/MarkLine.js +4 -0
- package/esm/components/MarkLine.js.map +1 -0
- package/esm/components/MarkPoint.d.ts +4 -0
- package/esm/components/MarkPoint.js +4 -0
- package/esm/components/MarkPoint.js.map +1 -0
- package/esm/components/Player.d.ts +5 -0
- package/esm/components/Player.js +6 -0
- package/esm/components/Player.js.map +1 -0
- package/esm/components/Region.d.ts +4 -4
- package/esm/components/Region.js +1 -2
- package/esm/components/Region.js.map +1 -1
- package/esm/components/ScrollBar.d.ts +5 -0
- package/esm/components/ScrollBar.js +6 -0
- package/esm/components/ScrollBar.js.map +1 -0
- package/esm/components/Title.d.ts +4 -0
- package/esm/components/Title.js +4 -0
- package/esm/components/Title.js.map +1 -0
- package/esm/components/Tooltip.d.ts +4 -0
- package/esm/components/Tooltip.js +4 -0
- package/esm/components/Tooltip.js.map +1 -0
- package/esm/components/index.d.ts +11 -0
- package/esm/components/index.js +23 -1
- package/esm/components/index.js.map +1 -1
- package/esm/constants.js +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/containers/withContainer.d.ts +2 -2
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/chart.d.ts +2 -3
- package/esm/context/chart.js.map +1 -1
- package/esm/context/stage.d.ts +2 -2
- package/esm/context/stage.js.map +1 -1
- package/esm/context/view.d.ts +2 -2
- package/esm/context/view.js.map +1 -1
- package/esm/eventsUtils.d.ts +148 -47
- package/esm/eventsUtils.js +48 -4
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +4 -3
- package/esm/index.js +4 -3
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +6 -5
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +6 -5
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.d.ts +2 -1
- package/esm/series/BaseSeries.js +22 -50
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +6 -5
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +6 -5
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +6 -5
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +6 -5
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +6 -5
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +6 -5
- package/esm/series/LinearProgress.js +1 -2
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +6 -5
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +6 -5
- package/esm/series/Map.js +2 -1
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +6 -5
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +6 -5
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +6 -5
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +6 -5
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +6 -5
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +6 -6
- package/esm/series/Series.js +1 -1
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +6 -5
- package/esm/series/WordCloud.js +1 -1
- package/esm/series/WordCloud.js.map +1 -1
- package/esm/series/index.js +1 -1
- package/esm/series/index.js.map +1 -1
- package/esm/util.js +1 -1
- package/esm/util.js.map +1 -1
- package/package.json +11 -9
package/esm/charts/MapChart.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'map';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
package/esm/charts/MapChart.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const MapChart = createChart("MapChart",
|
|
5
|
+
export const MapChart = createChart("MapChart", {
|
|
6
|
+
type: "map",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=MapChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/MapChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/MapChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAA2D,UAAU,EAAE;IACxG,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"MapChart.js","sourcesContent":["import React from 'react';\nimport type { IMapChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'map' }>('MapChart', {\n type: 'map',\n vchartConstrouctor: VChart\n});\n"]}
|
package/esm/charts/PieChart.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'pie';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
package/esm/charts/PieChart.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const PieChart = createChart("PieChart",
|
|
5
|
+
export const PieChart = createChart("PieChart", {
|
|
6
|
+
type: "pie",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=PieChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/PieChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/PieChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAA2D,UAAU,EAAE;IACxG,IAAI,EAAE,KAAK;IACX,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"PieChart.js","sourcesContent":["import React from 'react';\nimport type { IPieChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'pie' }>('PieChart', {\n type: 'pie',\n vchartConstrouctor: VChart\n});\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'radar';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
package/esm/charts/RadarChart.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const RadarChart = createChart("RadarChart",
|
|
5
|
+
export const RadarChart = createChart("RadarChart", {
|
|
6
|
+
type: "radar",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=RadarChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RadarChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/RadarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA+D,YAAY,EAAE;IAChH,IAAI,EAAE,OAAO;IACb,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"RadarChart.js","sourcesContent":["import React from 'react';\nimport type { IRadarChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'radar' }>('RadarChart', {\n type: 'radar',\n vchartConstrouctor: VChart\n});\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'rangeColumn';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const RangeColumnChart = createChart("RangeColumnChart",
|
|
5
|
+
export const RangeColumnChart = createChart("RangeColumnChart", {
|
|
6
|
+
type: "rangeColumn",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=RangeColumnChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RangeColumnChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/RangeColumnChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CACzC,kBAAkB,EAClB;IACE,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"RangeColumnChart.js","sourcesContent":["import React from 'react';\nimport type { IRangeColumnChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'rangeColumn' }>(\n 'RangeColumnChart',\n {\n type: 'rangeColumn',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'rose';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
package/esm/charts/RoseChart.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const RoseChart = createChart("RoseChart",
|
|
4
|
-
|
|
5
|
+
export const RoseChart = createChart("RoseChart", {
|
|
6
|
+
type: "rose",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RoseChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/RoseChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAA6D,WAAW,EAAE;IAC5G,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"RoseChart.js","sourcesContent":["import React from 'react';\nimport type { IRoseChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'rose' }>('RoseChart', {\n type: 'rose',\n vchartConstrouctor: VChart\n});\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'scatter';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const ScatterChart = createChart("ScatterChart",
|
|
5
|
+
export const ScatterChart = createChart("ScatterChart", {
|
|
6
|
+
type: "scatter",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=ScatterChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/ScatterChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/ScatterChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CACrC,cAAc,EACd;IACE,IAAI,EAAE,SAAS;IACf,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"ScatterChart.js","sourcesContent":["import React from 'react';\nimport type { IScatterChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'scatter' }>(\n 'ScatterChart',\n {\n type: 'scatter',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'sequence';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const SequenceChart = createChart("SequenceChart",
|
|
5
|
+
export const SequenceChart = createChart("SequenceChart", {
|
|
6
|
+
type: "sequence",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=SequenceChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/SequenceChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/SequenceChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CACtC,eAAe,EACf;IACE,IAAI,EAAE,UAAU;IAChB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"SequenceChart.js","sourcesContent":["import React from 'react';\nimport type { ISequenceChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'sequence' }>(\n 'SequenceChart',\n {\n type: 'sequence',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { 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
|
+
} & {
|
|
9
|
+
type: 'wordCloud';
|
|
10
|
+
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const WordCloudChart = createChart("WordCloudChart",
|
|
5
|
+
export const WordCloudChart = createChart("WordCloudChart", {
|
|
6
|
+
type: "wordCloud",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=WordCloudChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/WordCloudChart.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/charts/WordCloudChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CACvC,gBAAgB,EAChB;IACE,IAAI,EAAE,WAAW;IACjB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"WordCloudChart.js","sourcesContent":["import React from 'react';\nimport type { IWordCloudChartSpec } from '@visactor/vchart';\nimport { default as VChart } 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> & { type: 'wordCloud' }>(\n 'WordCloudChart',\n {\n type: 'wordCloud',\n vchartConstrouctor: VChart\n }\n);\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":["../src/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":["../src/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,9 +1,10 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface BaseComponentProps {
|
|
3
3
|
id?: string | number;
|
|
4
4
|
}
|
|
5
5
|
type ComponentProps = BaseComponentProps & {
|
|
6
6
|
updateId?: number;
|
|
7
|
+
componentId?: number;
|
|
7
8
|
};
|
|
8
9
|
export declare const createComponent: <T extends ComponentProps>(componentName: string, specName: string, supportedEvents?: Record<string, string> | null, isSingle?: boolean) => React.FC<T>;
|
|
9
10
|
export {};
|
|
@@ -1,47 +1,26 @@
|
|
|
1
1
|
import React, { useContext, useEffect } from "react";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { pickWithout } from "@visactor/vutils";
|
|
4
4
|
|
|
5
5
|
import RootChartContext from "../context/chart";
|
|
6
6
|
|
|
7
7
|
import { bindEventsToChart } from "../eventsUtils";
|
|
8
8
|
|
|
9
|
-
import { uid } from "../util";
|
|
10
|
-
|
|
11
9
|
export const createComponent = (componentName, specName, supportedEvents, isSingle) => {
|
|
12
|
-
const ignoreKeys = [ "id", "updateId" ], notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys, Comp = props => {
|
|
13
|
-
const context = useContext(RootChartContext),
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
const ignoreKeys = [ "id", "updateId", "componentId" ], notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys, Comp = props => {
|
|
11
|
+
const context = useContext(RootChartContext), eventsBinded = React.useRef(null), updateId = React.useRef(props.updateId);
|
|
12
|
+
if (props.updateId !== updateId.current) {
|
|
13
|
+
updateId.current = props.updateId;
|
|
14
|
+
!!supportedEvents && bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents) && (eventsBinded.current = props);
|
|
15
|
+
}
|
|
16
|
+
return useEffect((() => () => {
|
|
17
|
+
supportedEvents && bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);
|
|
19
18
|
}), []), null;
|
|
20
19
|
};
|
|
21
|
-
return Comp.displayName = componentName, Comp
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (isSingle) context.specFromChildren[specName] = Object.assign({}, props); else {
|
|
27
|
-
context.specFromChildren[specName] || (context.specFromChildren[specName] = []);
|
|
28
|
-
const comps = context.specFromChildren[specName], index = comps.findIndex((entry => entry.id === id));
|
|
29
|
-
index >= 0 ? comps[index] = Object.assign({
|
|
30
|
-
id: id
|
|
31
|
-
}, props) : context.specFromChildren[specName].push(Object.assign({
|
|
32
|
-
id: id
|
|
33
|
-
}, props));
|
|
34
|
-
}
|
|
35
|
-
context.isChildrenUpdated = !0;
|
|
36
|
-
}
|
|
37
|
-
}, deleteToContext = (context, id, specName, isSingle) => {
|
|
38
|
-
var _a;
|
|
39
|
-
if (context.specFromChildren) if (isSingle) context.specFromChildren[specName] = null; else {
|
|
40
|
-
const comps = null !== (_a = context.specFromChildren[specName]) && void 0 !== _a ? _a : [], index = comps.findIndex((entry => entry.id === id));
|
|
41
|
-
if (index >= 0) {
|
|
42
|
-
const newComps = comps.slice(0, index - 1).concat(comps.slice(index + 1));
|
|
43
|
-
context.specFromChildren[specName] = newComps, context.isChildrenUpdated = !0;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
20
|
+
return Comp.displayName = componentName, Comp.parseSpec = props => ({
|
|
21
|
+
spec: pickWithout(props, notSpecKeys),
|
|
22
|
+
specName: specName,
|
|
23
|
+
isSingle: isSingle
|
|
24
|
+
}), Comp;
|
|
46
25
|
};
|
|
47
26
|
//# sourceMappingURL=BaseComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/BaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"sources":["../src/components/BaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,gBAAgB,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAQnD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,aAAqB,EACrB,QAAgB,EAChB,eAA+C,EAC/C,QAAkB,EAClB,EAAE;IACF,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAEnG,MAAM,IAAI,GAAgB,CAAC,KAAQ,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC7C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAI,IAAI,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAS,KAAK,CAAC,QAAQ,CAAC,CAAC;QACtD,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,EAAE;YAEvC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;YAGlC,MAAM,mBAAmB,GAAG,eAAe;gBACzC,CAAC,CAAC,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,EAAE,eAAe,CAAC;gBAChF,CAAC,CAAC,KAAK,CAAC;YACV,IAAI,mBAAmB,EAAE;gBACvB,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;aAC9B;SACF;QAED,SAAS,CAAC,GAAG,EAAE;YACb,OAAO,GAAG,EAAE;gBACV,IAAI,eAAe,EAAE;oBACnB,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;iBAC/E;YACH,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IAChC,IAAY,CAAC,SAAS,GAAG,CAAC,KAAsD,EAAE,EAAE;QACnF,MAAM,gBAAgB,GAAe,WAAW,CAAI,KAAK,EAAE,WAAW,CAAC,CAAC;QAExE,OAAO;YACL,IAAI,EAAE,gBAAgB;YACtB,QAAQ;YACR,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseComponent.js","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport { pickWithout } from '@visactor/vutils';\n\nimport RootChartContext from '../context/chart';\nimport { bindEventsToChart } from '../eventsUtils';\n\nexport interface BaseComponentProps {\n id?: string | number;\n}\n\ntype ComponentProps = BaseComponentProps & { updateId?: number; componentId?: 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', 'componentId'];\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 eventsBinded = React.useRef<T>(null);\n const updateId = React.useRef<number>(props.updateId);\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 }\n\n useEffect(() => {\n return () => {\n if (supportedEvents) {\n bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);\n }\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n (Comp as any).parseSpec = (props: T & { updateId?: number; componentId?: string }) => {\n const newComponentSpec: Partial<T> = pickWithout<T>(props, notSpecKeys);\n\n return {\n spec: newComponentSpec,\n specName,\n isSingle\n };\n };\n\n return Comp;\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":["../src/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":["../src/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":["../src/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":["../src/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>;
|