vccs 0.1.0 → 0.2.0
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/dist/cartesian/funnel/Funnel.d.ts +2 -0
- package/dist/cartesian/funnel/index.d.ts +2 -0
- package/dist/cartesian/funnel/type.d.ts +74 -5
- package/dist/cartesian/index.d.ts +1 -0
- package/dist/chart/FunnelChart.d.ts +1 -0
- package/dist/chart/index.d.ts +1 -0
- package/dist/es/animation/Animate.mjs +48 -22
- package/dist/es/cartesian/GraphicalItemClipPath.mjs +16 -15
- package/dist/es/cartesian/area/ActivePoints.mjs +44 -40
- package/dist/es/cartesian/area/Area.mjs +42 -31
- package/dist/es/cartesian/area/ClipRect.mjs +79 -58
- package/dist/es/cartesian/area/RenderArea.mjs +142 -108
- package/dist/es/cartesian/area/hooks/useArea.mjs +71 -47
- package/dist/es/cartesian/area/type.mjs +11 -11
- package/dist/es/cartesian/area/utils.mjs +69 -49
- package/dist/es/cartesian/axis/XAxis.mjs +87 -73
- package/dist/es/cartesian/axis/YAxis.mjs +67 -56
- package/dist/es/cartesian/bar/Bar.mjs +93 -71
- package/dist/es/cartesian/bar/components/BarBackground.mjs +22 -19
- package/dist/es/cartesian/bar/components/BarRectangles.mjs +117 -80
- package/dist/es/cartesian/bar/hooks/useBar.mjs +49 -37
- package/dist/es/cartesian/bar/type.mjs +9 -9
- package/dist/es/cartesian/bar/utils.mjs +97 -70
- package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +165 -115
- package/dist/es/cartesian/cartesian-grid/Background.mjs +19 -16
- package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +116 -97
- package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +24 -23
- package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +24 -24
- package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +23 -22
- package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +24 -24
- package/dist/es/cartesian/cartesian-grid/const.mjs +317 -10
- package/dist/es/cartesian/cartesian-grid/utils.mjs +18 -13
- package/dist/es/cartesian/error-bar/ErrorBar.mjs +111 -83
- package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +13 -12
- package/dist/es/cartesian/funnel/Funnel.mjs +177 -0
- package/dist/es/cartesian/funnel/type.mjs +80 -0
- package/dist/es/cartesian/funnel/utils.mjs +102 -0
- package/dist/es/cartesian/line/ActivePoints.mjs +45 -41
- package/dist/es/cartesian/line/Line.mjs +41 -37
- package/dist/es/cartesian/line/StaticLine.mjs +191 -122
- package/dist/es/cartesian/line/hooks/useLine.mjs +60 -44
- package/dist/es/cartesian/line/type.mjs +11 -11
- package/dist/es/cartesian/line/utils.mjs +27 -26
- package/dist/es/cartesian/reference-area/ReferenceArea.mjs +86 -69
- package/dist/es/cartesian/reference-line/ReferenceLine.mjs +99 -77
- package/dist/es/cartesian/scatter/Scatter.mjs +168 -140
- package/dist/es/cartesian/scatter/hooks/useScatter.mjs +18 -14
- package/dist/es/cartesian/useNeedsClip.mjs +18 -9
- package/dist/es/cartesian/utils/get-ticks.mjs +103 -68
- package/dist/es/cartesian/z-axis/ZAxis.mjs +30 -28
- package/dist/es/chart/AreaChart.mjs +5 -5
- package/dist/es/chart/BarChart.mjs +5 -5
- package/dist/es/chart/ComposedChart.mjs +5 -5
- package/dist/es/chart/FunnelChart.mjs +11 -0
- package/dist/es/chart/LegendPortalContext.mjs +3 -3
- package/dist/es/chart/LineChart.mjs +5 -5
- package/dist/es/chart/PieChart.mjs +5 -5
- package/dist/es/chart/RadarChart.mjs +5 -5
- package/dist/es/chart/RadialBarChart.mjs +5 -5
- package/dist/es/chart/RechartsWrapper.mjs +111 -88
- package/dist/es/chart/ScatterChart.mjs +5 -5
- package/dist/es/chart/Surface.mjs +3 -3
- package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +51 -45
- package/dist/es/chart/TooltipPortalContext.mjs +3 -3
- package/dist/es/chart/const.mjs +2 -2
- package/dist/es/chart/generateCategoricalChart.mjs +97 -88
- package/dist/es/chart/provideClipPathId.mjs +12 -7
- package/dist/es/components/Cell.mjs +16 -4
- package/dist/es/components/Text.mjs +3 -3
- package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +106 -69
- package/dist/es/components/Tooltip.mjs +274 -199
- package/dist/es/components/label/Label.mjs +30 -26
- package/dist/es/components/label/LabelList.mjs +45 -39
- package/dist/es/components/label/types.mjs +8 -5
- package/dist/es/components/label/utils.mjs +194 -162
- package/dist/es/components/legend/Legend.mjs +82 -71
- package/dist/es/components/legend/LegendSymbol.mjs +40 -38
- package/dist/es/components/legend/hooks/useLegend.mjs +66 -46
- package/dist/es/components/legend/hooks/useLegendContent.mjs +52 -31
- package/dist/es/components/legend/type.mjs +2 -2
- package/dist/es/components/legend/utils.mjs +19 -11
- package/dist/es/components/utils.mjs +35 -22
- package/dist/es/container/ClipPath.mjs +14 -14
- package/dist/es/container/Layer.mjs +9 -7
- package/dist/es/container/ResponsiveContainer.mjs +3 -3
- package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +109 -77
- package/dist/es/container/Surface.mjs +23 -19
- package/dist/es/container/useSizeContext.mjs +3 -3
- package/dist/es/context/ChartDataContextProvider.mjs +19 -13
- package/dist/es/context/PanoramaContextProvider.mjs +15 -10
- package/dist/es/context/accessibilityContext.mjs +3 -3
- package/dist/es/context/cartesianLabelListContext.mjs +3 -3
- package/dist/es/context/chartLayoutContext.mjs +33 -30
- package/dist/es/context/cursorLayerContext.mjs +3 -3
- package/dist/es/context/graphicalLayerContext.mjs +3 -3
- package/dist/es/context/labelLayerContext.mjs +3 -3
- package/dist/es/context/polarLabelViewBoxContext.mjs +5 -5
- package/dist/es/context/useTooltipAxis.mjs +14 -12
- package/dist/es/events/useChartSynchronisation.mjs +91 -66
- package/dist/es/hooks/useIsAnimating.mjs +28 -0
- package/dist/es/hooks/useSetupGraphicalItem.mjs +52 -43
- package/dist/es/index.mjs +46 -42
- package/dist/es/polar/pie/Pie.mjs +131 -115
- package/dist/es/polar/pie/type.mjs +6 -6
- package/dist/es/polar/radar/PolarAngleAxis.mjs +103 -84
- package/dist/es/polar/radar/PolarGrid.mjs +72 -59
- package/dist/es/polar/radar/PolarRadiusAxis.mjs +90 -65
- package/dist/es/polar/radar/Radar.mjs +181 -145
- package/dist/es/polar/radial-bar/RadialBar.mjs +161 -140
- package/dist/es/polar/radial-bar/type.mjs +9 -9
- package/dist/es/shape/Cross.mjs +11 -10
- package/dist/es/shape/Curve.mjs +69 -43
- package/dist/es/shape/Dot.mjs +12 -11
- package/dist/es/shape/Rectangle.mjs +41 -26
- package/dist/es/shape/Sector.mjs +103 -75
- package/dist/es/shape/Symbols.mjs +45 -34
- package/dist/es/shape/Trapezoid.mjs +52 -0
- package/dist/es/state/ReportChartProps.mjs +21 -20
- package/dist/es/state/ReportMainChartProps.mjs +26 -21
- package/dist/es/state/ReportPolarOptions.mjs +23 -22
- package/dist/es/state/SetGraphicalItem.mjs +42 -27
- package/dist/es/state/SetLegendPayload.mjs +17 -13
- package/dist/es/state/SetTooltipEntrySettings.mjs +14 -12
- package/dist/es/state/brushSlice.mjs +12 -8
- package/dist/es/state/cartesianAxisSlice.mjs +23 -17
- package/dist/es/state/chartDataSlice.mjs +18 -13
- package/dist/es/state/externalEventsMiddleware.mjs +25 -15
- package/dist/es/state/graphicalItemsSlice.mjs +29 -25
- package/dist/es/state/hooks.mjs +4 -3
- package/dist/es/state/keyboardEventsMiddleware.mjs +50 -42
- package/dist/es/state/layoutSlice.mjs +18 -12
- package/dist/es/state/legendSlice.mjs +19 -14
- package/dist/es/state/mouseEventsMiddleware.mjs +31 -24
- package/dist/es/state/optionsSlice.mjs +14 -11
- package/dist/es/state/polarAxisSlice.mjs +15 -13
- package/dist/es/state/polarOptionsSlice.mjs +8 -6
- package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +5 -3
- package/dist/es/state/referenceElementsSlice.mjs +21 -19
- package/dist/es/state/rootPropsSlice.mjs +20 -9
- package/dist/es/state/selectors/areaSelectors.mjs +65 -55
- package/dist/es/state/selectors/axisSelectors.mjs +755 -569
- package/dist/es/state/selectors/barSelectors.mjs +225 -162
- package/dist/es/state/selectors/brushSelectors.mjs +15 -14
- package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +6 -5
- package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +36 -27
- package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +5 -3
- package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +13 -11
- package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +26 -21
- package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +10 -6
- package/dist/es/state/selectors/common.mjs +2 -2
- package/dist/es/state/selectors/containerSelectors.mjs +5 -2
- package/dist/es/state/selectors/dataSelectors.mjs +28 -9
- package/dist/es/state/selectors/funnelSelectors.mjs +38 -0
- package/dist/es/state/selectors/legendSelectors.mjs +7 -6
- package/dist/es/state/selectors/lineSelectors.mjs +54 -47
- package/dist/es/state/selectors/pickAxisId.mjs +2 -2
- package/dist/es/state/selectors/pickAxisType.mjs +2 -2
- package/dist/es/state/selectors/pieSelectors.mjs +116 -81
- package/dist/es/state/selectors/polarAxisSelectors.mjs +113 -94
- package/dist/es/state/selectors/polarGridSelectors.mjs +13 -11
- package/dist/es/state/selectors/polarScaleSelectors.mjs +49 -46
- package/dist/es/state/selectors/polarSelectors.mjs +79 -62
- package/dist/es/state/selectors/radarSelectors.mjs +111 -91
- package/dist/es/state/selectors/radialBarSelectors.mjs +230 -183
- package/dist/es/state/selectors/rootPropsSelectors.mjs +11 -5
- package/dist/es/state/selectors/scatterSelectors.mjs +111 -95
- package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +19 -17
- package/dist/es/state/selectors/selectAllAxes.mjs +8 -3
- package/dist/es/state/selectors/selectChartOffset.mjs +59 -50
- package/dist/es/state/selectors/selectChartOffsetInternal.mjs +55 -44
- package/dist/es/state/selectors/selectTooltipEventType.mjs +15 -14
- package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +3 -3
- package/dist/es/state/selectors/selectTooltipSettings.mjs +2 -2
- package/dist/es/state/selectors/selectTooltipState.mjs +2 -2
- package/dist/es/state/selectors/selectors.mjs +94 -75
- package/dist/es/state/selectors/tooltipSelectors.mjs +253 -204
- package/dist/es/state/selectors/touchSelectors.mjs +17 -14
- package/dist/es/state/store.mjs +46 -46
- package/dist/es/state/tooltipSlice.mjs +64 -37
- package/dist/es/state/touchEventsMiddleware.mjs +35 -29
- package/dist/es/state/utils/useReportScale.mjs +16 -13
- package/dist/es/synchronisation/syncSelectors.mjs +3 -3
- package/dist/es/synchronisation/useChartSynchronisation.mjs +33 -19
- package/dist/es/types/event.mjs +164 -2
- package/dist/es/utils/ReduceCSSCalc.mjs +81 -49
- package/dist/es/utils/VueUtils.mjs +35 -14
- package/dist/es/utils/attrs.mjs +43 -26
- package/dist/es/utils/cartesian.mjs +47 -15
- package/dist/es/utils/chart.mjs +298 -197
- package/dist/es/utils/const.mjs +30 -2
- package/dist/es/utils/createContext.mjs +28 -9
- package/dist/es/utils/data-utils.mjs +9 -8
- package/dist/es/utils/data.mjs +35 -21
- package/dist/es/utils/events.mjs +5 -3
- package/dist/es/utils/getLinearRegression.mjs +28 -11
- package/dist/es/utils/grid.mjs +20 -5
- package/dist/es/utils/isDomainSpecifiedByUser.mjs +105 -54
- package/dist/es/utils/legend.mjs +13 -12
- package/dist/es/utils/log.mjs +10 -7
- package/dist/es/utils/payload/getUniqPayload.mjs +6 -4
- package/dist/es/utils/polar.mjs +37 -30
- package/dist/es/utils/props.mjs +16 -10
- package/dist/es/utils/resolveDefaultProps.mjs +23 -4
- package/dist/es/utils/scale/getNiceTickValues.mjs +127 -49
- package/dist/es/utils/scale/utils/arithmetic.mjs +49 -19
- package/dist/es/utils/scale/utils/utils.mjs +43 -24
- package/dist/es/utils/style.mjs +24 -13
- package/dist/es/utils/tick.mjs +34 -23
- package/dist/es/utils/tooltip/translate.mjs +63 -49
- package/dist/es/utils/validate.mjs +40 -29
- package/dist/hooks/useIsAnimating.d.ts +14 -0
- package/dist/shape/Trapezoid.d.ts +31 -0
- package/dist/shape/index.d.ts +1 -0
- package/dist/state/graphicalItemsSlice.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { implicitZAxis
|
|
2
|
-
import { useAppDispatch
|
|
3
|
-
import { addZAxis
|
|
4
|
-
import { defineComponent
|
|
1
|
+
import { implicitZAxis } from "../../state/selectors/axisSelectors.mjs";
|
|
2
|
+
import { useAppDispatch } from "../../state/hooks.mjs";
|
|
3
|
+
import { addZAxis, removeZAxis } from "../../state/cartesianAxisSlice.mjs";
|
|
4
|
+
import { defineComponent, watchEffect } from "vue";
|
|
5
5
|
//#region src/cartesian/z-axis/ZAxis.tsx
|
|
6
|
-
var
|
|
6
|
+
var ZAxis = /* @__PURE__ */ defineComponent({
|
|
7
7
|
name: "ZAxis",
|
|
8
8
|
props: {
|
|
9
9
|
zAxisId: {
|
|
@@ -20,11 +20,11 @@ var o = /* @__PURE__ */ i({
|
|
|
20
20
|
},
|
|
21
21
|
type: {
|
|
22
22
|
type: String,
|
|
23
|
-
default:
|
|
23
|
+
default: implicitZAxis.type
|
|
24
24
|
},
|
|
25
25
|
range: {
|
|
26
26
|
type: Array,
|
|
27
|
-
default: () =>
|
|
27
|
+
default: () => implicitZAxis.range
|
|
28
28
|
},
|
|
29
29
|
domain: {
|
|
30
30
|
type: [Array, String],
|
|
@@ -32,7 +32,7 @@ var o = /* @__PURE__ */ i({
|
|
|
32
32
|
},
|
|
33
33
|
scale: {
|
|
34
34
|
type: [String, Function],
|
|
35
|
-
default:
|
|
35
|
+
default: implicitZAxis.scale
|
|
36
36
|
},
|
|
37
37
|
name: {
|
|
38
38
|
type: String,
|
|
@@ -43,28 +43,30 @@ var o = /* @__PURE__ */ i({
|
|
|
43
43
|
default: void 0
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
setup(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
id:
|
|
51
|
-
dataKey:
|
|
52
|
-
type:
|
|
53
|
-
range:
|
|
54
|
-
domain:
|
|
55
|
-
scale:
|
|
56
|
-
name:
|
|
57
|
-
unit:
|
|
58
|
-
allowDuplicatedCategory:
|
|
59
|
-
allowDataOverflow:
|
|
60
|
-
reversed:
|
|
61
|
-
includeHidden:
|
|
46
|
+
setup(props) {
|
|
47
|
+
const dispatch = useAppDispatch();
|
|
48
|
+
watchEffect((onCleanup) => {
|
|
49
|
+
const settings = {
|
|
50
|
+
id: props.zAxisId,
|
|
51
|
+
dataKey: props.dataKey,
|
|
52
|
+
type: props.type,
|
|
53
|
+
range: props.range,
|
|
54
|
+
domain: props.domain,
|
|
55
|
+
scale: props.scale,
|
|
56
|
+
name: props.name,
|
|
57
|
+
unit: props.unit,
|
|
58
|
+
allowDuplicatedCategory: implicitZAxis.allowDuplicatedCategory,
|
|
59
|
+
allowDataOverflow: implicitZAxis.allowDataOverflow,
|
|
60
|
+
reversed: implicitZAxis.reversed,
|
|
61
|
+
includeHidden: implicitZAxis.includeHidden
|
|
62
62
|
};
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
dispatch(addZAxis(settings));
|
|
64
|
+
onCleanup(() => {
|
|
65
|
+
dispatch(removeZAxis(settings));
|
|
65
66
|
});
|
|
66
|
-
})
|
|
67
|
+
});
|
|
68
|
+
return () => null;
|
|
67
69
|
}
|
|
68
70
|
});
|
|
69
71
|
//#endregion
|
|
70
|
-
export {
|
|
72
|
+
export { ZAxis };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
3
|
//#region src/chart/AreaChart.ts
|
|
4
|
-
var
|
|
4
|
+
var AreaChart = generateCategoricalChart({
|
|
5
5
|
chartName: "AreaChart",
|
|
6
|
-
tooltipPayloadSearcher:
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
7
7
|
});
|
|
8
8
|
//#endregion
|
|
9
|
-
export {
|
|
9
|
+
export { AreaChart };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
3
|
-
var
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var BarChart = generateCategoricalChart({
|
|
4
4
|
chartName: "BarChart",
|
|
5
5
|
defaultTooltipEventType: "axis",
|
|
6
|
-
tooltipPayloadSearcher:
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
7
|
validateTooltipEventTypes: ["axis", "item"]
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { BarChart };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
3
|
-
var
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var ComposedChart = generateCategoricalChart({
|
|
4
4
|
chartName: "ComposedChart",
|
|
5
5
|
defaultTooltipEventType: "axis",
|
|
6
|
-
tooltipPayloadSearcher:
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
7
|
validateTooltipEventTypes: ["axis"]
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { ComposedChart };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
//#region src/chart/FunnelChart.ts
|
|
4
|
+
var FunnelChart = generateCategoricalChart({
|
|
5
|
+
chartName: "FunnelChart",
|
|
6
|
+
defaultTooltipEventType: "item",
|
|
7
|
+
validateTooltipEventTypes: ["item"],
|
|
8
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { FunnelChart };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext
|
|
1
|
+
import { createContext } from "../utils/createContext.mjs";
|
|
2
2
|
//#region src/chart/LegendPortalContext.ts
|
|
3
|
-
var [
|
|
3
|
+
var [useLegendPortal, provideLegendPortalRaw] = createContext("LegendPortalContext");
|
|
4
4
|
//#endregion
|
|
5
|
-
export {
|
|
5
|
+
export { provideLegendPortalRaw, useLegendPortal };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
3
|
-
var
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var LineChart = generateCategoricalChart({
|
|
4
4
|
chartName: "LineChart",
|
|
5
5
|
defaultTooltipEventType: "axis",
|
|
6
|
-
tooltipPayloadSearcher:
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
7
|
validateTooltipEventTypes: ["axis", "item"]
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { LineChart };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
3
|
//#region src/chart/PieChart.ts
|
|
4
|
-
var
|
|
4
|
+
var PieChart = generateCategoricalChart({
|
|
5
5
|
chartName: "PieChart",
|
|
6
6
|
defaultProps: {
|
|
7
7
|
layout: "centric",
|
|
@@ -10,7 +10,7 @@ var n = t({
|
|
|
10
10
|
},
|
|
11
11
|
defaultTooltipEventType: "item",
|
|
12
12
|
validateTooltipEventTypes: ["item"],
|
|
13
|
-
tooltipPayloadSearcher:
|
|
13
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { PieChart };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
3
|
//#region src/chart/RadarChart.ts
|
|
4
|
-
var
|
|
4
|
+
var RadarChart = generateCategoricalChart({
|
|
5
5
|
chartName: "RadarChart",
|
|
6
6
|
defaultProps: {
|
|
7
7
|
layout: "centric",
|
|
@@ -10,7 +10,7 @@ var n = t({
|
|
|
10
10
|
},
|
|
11
11
|
defaultTooltipEventType: "axis",
|
|
12
12
|
validateTooltipEventTypes: ["axis"],
|
|
13
|
-
tooltipPayloadSearcher:
|
|
13
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { RadarChart };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
3
|
//#region src/chart/RadialBarChart.ts
|
|
4
|
-
var
|
|
4
|
+
var RadialBarChart = generateCategoricalChart({
|
|
5
5
|
chartName: "RadialBarChart",
|
|
6
6
|
defaultProps: {
|
|
7
7
|
layout: "radial",
|
|
@@ -10,7 +10,7 @@ var n = t({
|
|
|
10
10
|
},
|
|
11
11
|
defaultTooltipEventType: "axis",
|
|
12
12
|
validateTooltipEventTypes: ["axis", "item"],
|
|
13
|
-
tooltipPayloadSearcher:
|
|
13
|
+
tooltipPayloadSearcher: arrayTooltipSearcher
|
|
14
14
|
});
|
|
15
15
|
//#endregion
|
|
16
|
-
export {
|
|
16
|
+
export { RadialBarChart };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { getChartPointer
|
|
2
|
-
import { mouseLeaveChart
|
|
3
|
-
import { useAppDispatch
|
|
4
|
-
import { mouseClickAction
|
|
5
|
-
import { focusAction
|
|
6
|
-
import { externalEventAction
|
|
7
|
-
import { touchEventAction
|
|
8
|
-
import { useSynchronisedEventsFromOtherCharts
|
|
9
|
-
import { useReportScale
|
|
10
|
-
import { providePortalRaw
|
|
11
|
-
import { provideLegendPortalRaw
|
|
12
|
-
import { createVNode
|
|
1
|
+
import { getChartPointer } from "../utils/chart.mjs";
|
|
2
|
+
import { mouseLeaveChart } from "../state/tooltipSlice.mjs";
|
|
3
|
+
import { useAppDispatch } from "../state/hooks.mjs";
|
|
4
|
+
import { mouseClickAction, mouseMoveAction } from "../state/mouseEventsMiddleware.mjs";
|
|
5
|
+
import { focusAction, keyDownAction } from "../state/keyboardEventsMiddleware.mjs";
|
|
6
|
+
import { externalEventAction } from "../state/externalEventsMiddleware.mjs";
|
|
7
|
+
import { touchEventAction } from "../state/touchEventsMiddleware.mjs";
|
|
8
|
+
import { useSynchronisedEventsFromOtherCharts } from "../events/useChartSynchronisation.mjs";
|
|
9
|
+
import { useReportScale } from "../state/utils/useReportScale.mjs";
|
|
10
|
+
import { providePortalRaw } from "./TooltipPortalContext.mjs";
|
|
11
|
+
import { provideLegendPortalRaw } from "./LegendPortalContext.mjs";
|
|
12
|
+
import { createVNode, defineComponent, ref } from "vue";
|
|
13
13
|
//#region src/chart/RechartsWrapper.tsx
|
|
14
|
-
var
|
|
14
|
+
var RechartsWrapper = /* @__PURE__ */ defineComponent({
|
|
15
15
|
name: "RechartsWrapper",
|
|
16
16
|
props: {
|
|
17
17
|
class: { type: String },
|
|
18
18
|
height: {
|
|
19
19
|
type: Number,
|
|
20
|
-
required:
|
|
20
|
+
required: true
|
|
21
21
|
},
|
|
22
22
|
onClick: { type: Function },
|
|
23
23
|
onContextMenu: { type: Function },
|
|
@@ -33,105 +33,128 @@ var g = /* @__PURE__ */ m({
|
|
|
33
33
|
style: { type: Object },
|
|
34
34
|
width: {
|
|
35
35
|
type: Number,
|
|
36
|
-
required:
|
|
36
|
+
required: true
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
|
-
setup(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
setup(props, { slots }) {
|
|
40
|
+
const dispatch = useAppDispatch();
|
|
41
|
+
useSynchronisedEventsFromOtherCharts();
|
|
42
|
+
const scaleRef = useReportScale();
|
|
43
|
+
const tooltipPortal = ref(null);
|
|
44
|
+
const legendPortal = ref(null);
|
|
45
|
+
providePortalRaw(tooltipPortal);
|
|
46
|
+
provideLegendPortalRaw(legendPortal);
|
|
47
|
+
const innerRef = (node) => {
|
|
48
|
+
scaleRef.value = node;
|
|
49
|
+
tooltipPortal.value = node;
|
|
50
|
+
legendPortal.value = node;
|
|
51
|
+
};
|
|
52
|
+
const myOnClick = (e) => {
|
|
53
|
+
const chartPointer = getChartPointer(e);
|
|
54
|
+
if (chartPointer) dispatch(mouseClickAction(chartPointer));
|
|
55
|
+
dispatch(externalEventAction({
|
|
56
|
+
handler: props.onClick,
|
|
57
|
+
event: e
|
|
51
58
|
}));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
};
|
|
60
|
+
const myOnMouseEnter = (e) => {
|
|
61
|
+
const chartPointer = getChartPointer(e);
|
|
62
|
+
if (chartPointer) dispatch(mouseMoveAction(chartPointer));
|
|
63
|
+
dispatch(externalEventAction({
|
|
64
|
+
handler: props.onMouseEnter,
|
|
65
|
+
event: e
|
|
57
66
|
}));
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
};
|
|
68
|
+
const myOnMouseLeave = (e) => {
|
|
69
|
+
dispatch(mouseLeaveChart());
|
|
70
|
+
dispatch(externalEventAction({
|
|
71
|
+
handler: props.onMouseLeave,
|
|
61
72
|
event: e
|
|
62
73
|
}));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
};
|
|
75
|
+
const myOnMouseMove = (e) => {
|
|
76
|
+
const chartPointer = getChartPointer(e);
|
|
77
|
+
if (chartPointer) dispatch(mouseMoveAction(chartPointer));
|
|
78
|
+
dispatch(externalEventAction({
|
|
79
|
+
handler: props.onMouseMove,
|
|
80
|
+
event: e
|
|
68
81
|
}));
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
82
|
+
};
|
|
83
|
+
const onFocus = () => {
|
|
84
|
+
dispatch(focusAction());
|
|
85
|
+
};
|
|
86
|
+
const onKeyDown = (e) => {
|
|
87
|
+
dispatch(keyDownAction(e.key));
|
|
88
|
+
};
|
|
89
|
+
const myOnContextMenu = (e) => {
|
|
90
|
+
dispatch(externalEventAction({
|
|
91
|
+
handler: props.onContextMenu,
|
|
76
92
|
event: e
|
|
77
93
|
}));
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
94
|
+
};
|
|
95
|
+
const myOnDoubleClick = (e) => {
|
|
96
|
+
dispatch(externalEventAction({
|
|
97
|
+
handler: props.onDoubleClick,
|
|
81
98
|
event: e
|
|
82
99
|
}));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
};
|
|
101
|
+
const myOnMouseDown = (e) => {
|
|
102
|
+
dispatch(externalEventAction({
|
|
103
|
+
handler: props.onMouseDown,
|
|
86
104
|
event: e
|
|
87
105
|
}));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
106
|
+
};
|
|
107
|
+
const myOnMouseUp = (e) => {
|
|
108
|
+
dispatch(externalEventAction({
|
|
109
|
+
handler: props.onMouseUp,
|
|
91
110
|
event: e
|
|
92
111
|
}));
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
};
|
|
113
|
+
const myOnTouchStart = (e) => {
|
|
114
|
+
dispatch(externalEventAction({
|
|
115
|
+
handler: props.onTouchStart,
|
|
96
116
|
event: e
|
|
97
117
|
}));
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
|
|
118
|
+
};
|
|
119
|
+
const myOnTouchMove = (e) => {
|
|
120
|
+
dispatch(touchEventAction(e));
|
|
121
|
+
dispatch(externalEventAction({
|
|
122
|
+
handler: props.onTouchMove,
|
|
101
123
|
event: e
|
|
102
124
|
}));
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
125
|
+
};
|
|
126
|
+
const myOnTouchEnd = (e) => {
|
|
127
|
+
dispatch(externalEventAction({
|
|
128
|
+
handler: props.onTouchEnd,
|
|
106
129
|
event: e
|
|
107
130
|
}));
|
|
108
131
|
};
|
|
109
|
-
return () =>
|
|
110
|
-
class: ["v-charts-wrapper",
|
|
111
|
-
style: {
|
|
132
|
+
return () => createVNode("div", {
|
|
133
|
+
"class": ["v-charts-wrapper", props.class],
|
|
134
|
+
"style": {
|
|
112
135
|
position: "relative",
|
|
113
136
|
cursor: "default",
|
|
114
|
-
width: `${
|
|
115
|
-
height: `${
|
|
116
|
-
...
|
|
137
|
+
width: `${props.width}px`,
|
|
138
|
+
height: `${props.height}px`,
|
|
139
|
+
...props.style
|
|
117
140
|
},
|
|
118
|
-
role: "application",
|
|
119
|
-
onClick:
|
|
120
|
-
onContextmenu:
|
|
121
|
-
onDblclick:
|
|
122
|
-
onFocus:
|
|
123
|
-
onKeydown:
|
|
124
|
-
onMousedown:
|
|
125
|
-
onMouseenter:
|
|
126
|
-
onMouseleave:
|
|
127
|
-
onMousemove:
|
|
128
|
-
onMouseup:
|
|
129
|
-
onTouchend:
|
|
130
|
-
onTouchmove:
|
|
131
|
-
onTouchstart:
|
|
132
|
-
ref:
|
|
133
|
-
}, [
|
|
141
|
+
"role": "application",
|
|
142
|
+
"onClick": myOnClick,
|
|
143
|
+
"onContextmenu": myOnContextMenu,
|
|
144
|
+
"onDblclick": myOnDoubleClick,
|
|
145
|
+
"onFocus": onFocus,
|
|
146
|
+
"onKeydown": onKeyDown,
|
|
147
|
+
"onMousedown": myOnMouseDown,
|
|
148
|
+
"onMouseenter": myOnMouseEnter,
|
|
149
|
+
"onMouseleave": myOnMouseLeave,
|
|
150
|
+
"onMousemove": myOnMouseMove,
|
|
151
|
+
"onMouseup": myOnMouseUp,
|
|
152
|
+
"onTouchend": myOnTouchEnd,
|
|
153
|
+
"onTouchmove": myOnTouchMove,
|
|
154
|
+
"onTouchstart": myOnTouchStart,
|
|
155
|
+
"ref": innerRef
|
|
156
|
+
}, [slots.default?.()]);
|
|
134
157
|
}
|
|
135
158
|
});
|
|
136
159
|
//#endregion
|
|
137
|
-
export {
|
|
160
|
+
export { RechartsWrapper };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { arrayTooltipSearcher
|
|
2
|
-
import { generateCategoricalChart
|
|
3
|
-
var
|
|
1
|
+
import { arrayTooltipSearcher } from "../state/optionsSlice.mjs";
|
|
2
|
+
import { generateCategoricalChart } from "./generateCategoricalChart.mjs";
|
|
3
|
+
var ScatterChart = generateCategoricalChart({
|
|
4
4
|
chartName: "ScatterChart",
|
|
5
5
|
defaultTooltipEventType: "item",
|
|
6
|
-
tooltipPayloadSearcher:
|
|
6
|
+
tooltipPayloadSearcher: arrayTooltipSearcher,
|
|
7
7
|
validateTooltipEventTypes: ["axis", "item"]
|
|
8
8
|
});
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { ScatterChart };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Surface_vue_vue_type_script_setup_true_lang_default from "./Surface.vue_vue_type_script_setup_true_lang.mjs";
|
|
2
2
|
//#region src/chart/Surface.vue
|
|
3
|
-
var
|
|
3
|
+
var Surface_default = Surface_vue_vue_type_script_setup_true_lang_default;
|
|
4
4
|
//#endregion
|
|
5
|
-
export {
|
|
5
|
+
export { Surface_default as default };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { provideLabelLayerRef
|
|
2
|
-
import { provideGraphicalLayerRef
|
|
3
|
-
import { provideCursorLayerRef
|
|
4
|
-
import { computed
|
|
1
|
+
import { provideLabelLayerRef } from "../context/labelLayerContext.mjs";
|
|
2
|
+
import { provideGraphicalLayerRef } from "../context/graphicalLayerContext.mjs";
|
|
3
|
+
import { provideCursorLayerRef } from "../context/cursorLayerContext.mjs";
|
|
4
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, openBlock, ref, renderSlot, toDisplayString } from "vue";
|
|
5
5
|
//#region src/chart/Surface.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var _hoisted_1 = [
|
|
7
7
|
"width",
|
|
8
8
|
"height",
|
|
9
9
|
"viewBox"
|
|
10
|
-
]
|
|
10
|
+
];
|
|
11
|
+
var Surface_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
11
12
|
name: "ChartsSurface",
|
|
12
|
-
inheritAttrs:
|
|
13
|
+
inheritAttrs: false,
|
|
13
14
|
__name: "Surface",
|
|
14
15
|
props: {
|
|
15
16
|
width: {},
|
|
@@ -20,47 +21,52 @@ var f = [
|
|
|
20
21
|
title: {},
|
|
21
22
|
desc: {}
|
|
22
23
|
},
|
|
23
|
-
setup(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
setup(__props) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const svgViewBox = computed(() => {
|
|
27
|
+
const svgView = props.viewBox || {
|
|
28
|
+
width: props.width,
|
|
29
|
+
height: props.height,
|
|
28
30
|
x: 0,
|
|
29
31
|
y: 0
|
|
30
32
|
};
|
|
31
|
-
return `${
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
33
|
+
return `${svgView.x} ${svgView.y} ${svgView.width} ${svgView.height}`;
|
|
34
|
+
});
|
|
35
|
+
const cursorLayerRef = ref(null);
|
|
36
|
+
provideCursorLayerRef(cursorLayerRef);
|
|
37
|
+
const graphicalLayerRef = ref(null);
|
|
38
|
+
provideGraphicalLayerRef(graphicalLayerRef);
|
|
39
|
+
const labelLayerRef = ref(null);
|
|
40
|
+
provideLabelLayerRef(labelLayerRef);
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
return openBlock(), createElementBlock("svg", mergeProps(_ctx.$attrs, {
|
|
43
|
+
class: ["vcharts-surface", [props.class]],
|
|
44
|
+
width: _ctx.width,
|
|
45
|
+
height: _ctx.height,
|
|
46
|
+
style: _ctx.style,
|
|
47
|
+
viewBox: svgViewBox.value
|
|
48
|
+
}), [
|
|
49
|
+
createElementVNode("title", null, toDisplayString(_ctx.title), 1),
|
|
50
|
+
createElementVNode("desc", null, toDisplayString(_ctx.desc), 1),
|
|
51
|
+
renderSlot(_ctx.$slots, "default"),
|
|
52
|
+
createElementVNode("g", {
|
|
53
|
+
ref_key: "cursorLayerRef",
|
|
54
|
+
ref: cursorLayerRef,
|
|
55
|
+
class: "v-charts-cursor-layer"
|
|
56
|
+
}, null, 512),
|
|
57
|
+
createElementVNode("g", {
|
|
58
|
+
ref_key: "graphicalLayerRef",
|
|
59
|
+
ref: graphicalLayerRef,
|
|
60
|
+
class: "v-charts-graphical-layer"
|
|
61
|
+
}, null, 512),
|
|
62
|
+
createElementVNode("g", {
|
|
63
|
+
ref_key: "labelLayerRef",
|
|
64
|
+
ref: labelLayerRef,
|
|
65
|
+
class: "v-charts-label-layer"
|
|
66
|
+
}, null, 512)
|
|
67
|
+
], 16, _hoisted_1);
|
|
68
|
+
};
|
|
63
69
|
}
|
|
64
70
|
});
|
|
65
71
|
//#endregion
|
|
66
|
-
export {
|
|
72
|
+
export { Surface_vue_vue_type_script_setup_true_lang_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext
|
|
1
|
+
import { createContext } from "../utils/createContext.mjs";
|
|
2
2
|
//#region src/chart/TooltipPortalContext.ts
|
|
3
|
-
var [
|
|
3
|
+
var [usePortal, providePortalRaw] = createContext("PortalContext");
|
|
4
4
|
//#endregion
|
|
5
|
-
export {
|
|
5
|
+
export { providePortalRaw, usePortal };
|