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,5 +1,5 @@
|
|
|
1
1
|
//#region src/cartesian/cartesian-grid/const.ts
|
|
2
|
-
var
|
|
2
|
+
var CartesianAxisDefaultProps = {
|
|
3
3
|
x: 0,
|
|
4
4
|
y: 0,
|
|
5
5
|
width: 0,
|
|
@@ -13,17 +13,324 @@ var e = {
|
|
|
13
13
|
orientation: "bottom",
|
|
14
14
|
ticks: [],
|
|
15
15
|
stroke: "#666",
|
|
16
|
-
tickLine:
|
|
17
|
-
axisLine:
|
|
18
|
-
mirror:
|
|
16
|
+
tickLine: true,
|
|
17
|
+
axisLine: true,
|
|
18
|
+
mirror: false,
|
|
19
19
|
minTickGap: 5,
|
|
20
20
|
tickSize: 6,
|
|
21
21
|
tickMargin: 2,
|
|
22
22
|
interval: "preserveEnd"
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
};
|
|
24
|
+
var SVGContainerPropKeys = ["viewBox"];
|
|
25
|
+
var PolyElementKeys = ["points", "pathLength"];
|
|
26
|
+
/** map of svg element types to unique svg attributes that belong to that element */
|
|
27
|
+
var FilteredElementKeyMap = {
|
|
28
|
+
svg: SVGContainerPropKeys,
|
|
29
|
+
polygon: PolyElementKeys,
|
|
30
|
+
polyline: PolyElementKeys
|
|
31
|
+
};
|
|
32
|
+
var SVGElementPropKeys = [
|
|
33
|
+
"aria-activedescendant",
|
|
34
|
+
"aria-atomic",
|
|
35
|
+
"aria-autocomplete",
|
|
36
|
+
"aria-busy",
|
|
37
|
+
"aria-checked",
|
|
38
|
+
"aria-colcount",
|
|
39
|
+
"aria-colindex",
|
|
40
|
+
"aria-colspan",
|
|
41
|
+
"aria-controls",
|
|
42
|
+
"aria-current",
|
|
43
|
+
"aria-describedby",
|
|
44
|
+
"aria-details",
|
|
45
|
+
"aria-disabled",
|
|
46
|
+
"aria-errormessage",
|
|
47
|
+
"aria-expanded",
|
|
48
|
+
"aria-flowto",
|
|
49
|
+
"aria-haspopup",
|
|
50
|
+
"aria-hidden",
|
|
51
|
+
"aria-invalid",
|
|
52
|
+
"aria-keyshortcuts",
|
|
53
|
+
"aria-label",
|
|
54
|
+
"aria-labelledby",
|
|
55
|
+
"aria-level",
|
|
56
|
+
"aria-live",
|
|
57
|
+
"aria-modal",
|
|
58
|
+
"aria-multiline",
|
|
59
|
+
"aria-multiselectable",
|
|
60
|
+
"aria-orientation",
|
|
61
|
+
"aria-owns",
|
|
62
|
+
"aria-placeholder",
|
|
63
|
+
"aria-posinset",
|
|
64
|
+
"aria-pressed",
|
|
65
|
+
"aria-readonly",
|
|
66
|
+
"aria-relevant",
|
|
67
|
+
"aria-required",
|
|
68
|
+
"aria-roledescription",
|
|
69
|
+
"aria-rowcount",
|
|
70
|
+
"aria-rowindex",
|
|
71
|
+
"aria-rowspan",
|
|
72
|
+
"aria-selected",
|
|
73
|
+
"aria-setsize",
|
|
74
|
+
"aria-sort",
|
|
75
|
+
"aria-valuemax",
|
|
76
|
+
"aria-valuemin",
|
|
77
|
+
"aria-valuenow",
|
|
78
|
+
"aria-valuetext",
|
|
79
|
+
"class",
|
|
80
|
+
"color",
|
|
81
|
+
"height",
|
|
82
|
+
"id",
|
|
83
|
+
"lang",
|
|
84
|
+
"max",
|
|
85
|
+
"media",
|
|
86
|
+
"method",
|
|
87
|
+
"min",
|
|
88
|
+
"name",
|
|
89
|
+
"style",
|
|
90
|
+
"target",
|
|
91
|
+
"width",
|
|
92
|
+
"role",
|
|
93
|
+
"tabIndex",
|
|
94
|
+
"accentHeight",
|
|
95
|
+
"accumulate",
|
|
96
|
+
"additive",
|
|
97
|
+
"alignmentBaseline",
|
|
98
|
+
"allowReorder",
|
|
99
|
+
"alphabetic",
|
|
100
|
+
"amplitude",
|
|
101
|
+
"arabicForm",
|
|
102
|
+
"ascent",
|
|
103
|
+
"attributeName",
|
|
104
|
+
"attributeType",
|
|
105
|
+
"autoReverse",
|
|
106
|
+
"azimuth",
|
|
107
|
+
"baseFrequency",
|
|
108
|
+
"baselineShift",
|
|
109
|
+
"baseProfile",
|
|
110
|
+
"bbox",
|
|
111
|
+
"begin",
|
|
112
|
+
"bias",
|
|
113
|
+
"by",
|
|
114
|
+
"calcMode",
|
|
115
|
+
"capHeight",
|
|
116
|
+
"clip",
|
|
117
|
+
"clipPath",
|
|
118
|
+
"clipPathUnits",
|
|
119
|
+
"clipRule",
|
|
120
|
+
"colorInterpolation",
|
|
121
|
+
"colorInterpolationFilters",
|
|
122
|
+
"colorProfile",
|
|
123
|
+
"colorRendering",
|
|
124
|
+
"contentScriptType",
|
|
125
|
+
"contentStyleType",
|
|
126
|
+
"cursor",
|
|
127
|
+
"cx",
|
|
128
|
+
"cy",
|
|
129
|
+
"d",
|
|
130
|
+
"decelerate",
|
|
131
|
+
"descent",
|
|
132
|
+
"diffuseConstant",
|
|
133
|
+
"direction",
|
|
134
|
+
"display",
|
|
135
|
+
"divisor",
|
|
136
|
+
"dominantBaseline",
|
|
137
|
+
"dur",
|
|
138
|
+
"dx",
|
|
139
|
+
"dy",
|
|
140
|
+
"edgeMode",
|
|
141
|
+
"elevation",
|
|
142
|
+
"enableBackground",
|
|
143
|
+
"end",
|
|
144
|
+
"exponent",
|
|
145
|
+
"externalResourcesRequired",
|
|
146
|
+
"fill",
|
|
147
|
+
"fillOpacity",
|
|
148
|
+
"fillRule",
|
|
149
|
+
"filter",
|
|
150
|
+
"filterRes",
|
|
151
|
+
"filterUnits",
|
|
152
|
+
"floodColor",
|
|
153
|
+
"floodOpacity",
|
|
154
|
+
"focusable",
|
|
155
|
+
"fontFamily",
|
|
156
|
+
"fontSize",
|
|
157
|
+
"fontSizeAdjust",
|
|
158
|
+
"fontStretch",
|
|
159
|
+
"fontStyle",
|
|
160
|
+
"fontVariant",
|
|
161
|
+
"fontWeight",
|
|
162
|
+
"format",
|
|
163
|
+
"from",
|
|
164
|
+
"fx",
|
|
165
|
+
"fy",
|
|
166
|
+
"g1",
|
|
167
|
+
"g2",
|
|
168
|
+
"glyphName",
|
|
169
|
+
"glyphOrientationHorizontal",
|
|
170
|
+
"glyphOrientationVertical",
|
|
171
|
+
"glyphRef",
|
|
172
|
+
"gradientTransform",
|
|
173
|
+
"gradientUnits",
|
|
174
|
+
"hanging",
|
|
175
|
+
"horizAdvX",
|
|
176
|
+
"horizOriginX",
|
|
177
|
+
"href",
|
|
178
|
+
"ideographic",
|
|
179
|
+
"imageRendering",
|
|
180
|
+
"in2",
|
|
181
|
+
"in",
|
|
182
|
+
"intercept",
|
|
183
|
+
"k1",
|
|
184
|
+
"k2",
|
|
185
|
+
"k3",
|
|
186
|
+
"k4",
|
|
187
|
+
"k",
|
|
188
|
+
"kernelMatrix",
|
|
189
|
+
"kernelUnitLength",
|
|
190
|
+
"kerning",
|
|
191
|
+
"keyPoints",
|
|
192
|
+
"keySplines",
|
|
193
|
+
"keyTimes",
|
|
194
|
+
"lengthAdjust",
|
|
195
|
+
"letterSpacing",
|
|
196
|
+
"lightingColor",
|
|
197
|
+
"limitingConeAngle",
|
|
198
|
+
"local",
|
|
199
|
+
"markerEnd",
|
|
200
|
+
"markerHeight",
|
|
201
|
+
"markerMid",
|
|
202
|
+
"markerStart",
|
|
203
|
+
"markerUnits",
|
|
204
|
+
"markerWidth",
|
|
205
|
+
"mask",
|
|
206
|
+
"maskContentUnits",
|
|
207
|
+
"maskUnits",
|
|
208
|
+
"mathematical",
|
|
209
|
+
"mode",
|
|
210
|
+
"numOctaves",
|
|
211
|
+
"offset",
|
|
212
|
+
"opacity",
|
|
213
|
+
"operator",
|
|
214
|
+
"order",
|
|
215
|
+
"orient",
|
|
216
|
+
"orientation",
|
|
217
|
+
"origin",
|
|
218
|
+
"overflow",
|
|
219
|
+
"overlinePosition",
|
|
220
|
+
"overlineThickness",
|
|
221
|
+
"paintOrder",
|
|
222
|
+
"panose1",
|
|
223
|
+
"pathLength",
|
|
224
|
+
"patternContentUnits",
|
|
225
|
+
"patternTransform",
|
|
226
|
+
"patternUnits",
|
|
227
|
+
"pointerEvents",
|
|
228
|
+
"pointsAtX",
|
|
229
|
+
"pointsAtY",
|
|
230
|
+
"pointsAtZ",
|
|
231
|
+
"preserveAlpha",
|
|
232
|
+
"preserveAspectRatio",
|
|
233
|
+
"primitiveUnits",
|
|
234
|
+
"r",
|
|
235
|
+
"radius",
|
|
236
|
+
"refX",
|
|
237
|
+
"refY",
|
|
238
|
+
"renderingIntent",
|
|
239
|
+
"repeatCount",
|
|
240
|
+
"repeatDur",
|
|
241
|
+
"requiredExtensions",
|
|
242
|
+
"requiredFeatures",
|
|
243
|
+
"restart",
|
|
244
|
+
"result",
|
|
245
|
+
"rotate",
|
|
246
|
+
"rx",
|
|
247
|
+
"ry",
|
|
248
|
+
"seed",
|
|
249
|
+
"shapeRendering",
|
|
250
|
+
"slope",
|
|
251
|
+
"spacing",
|
|
252
|
+
"specularConstant",
|
|
253
|
+
"specularExponent",
|
|
254
|
+
"speed",
|
|
255
|
+
"spreadMethod",
|
|
256
|
+
"startOffset",
|
|
257
|
+
"stdDeviation",
|
|
258
|
+
"stemh",
|
|
259
|
+
"stemv",
|
|
260
|
+
"stitchTiles",
|
|
261
|
+
"stopColor",
|
|
262
|
+
"stopOpacity",
|
|
263
|
+
"strikethroughPosition",
|
|
264
|
+
"strikethroughThickness",
|
|
265
|
+
"string",
|
|
266
|
+
"stroke",
|
|
267
|
+
"stroke-dasharray",
|
|
268
|
+
"strokeDashoffset",
|
|
269
|
+
"strokeLinecap",
|
|
270
|
+
"strokeLinejoin",
|
|
271
|
+
"strokeMiterlimit",
|
|
272
|
+
"strokeOpacity",
|
|
273
|
+
"strokeWidth",
|
|
274
|
+
"surfaceScale",
|
|
275
|
+
"systemLanguage",
|
|
276
|
+
"tableValues",
|
|
277
|
+
"targetX",
|
|
278
|
+
"targetY",
|
|
279
|
+
"textAnchor",
|
|
280
|
+
"textDecoration",
|
|
281
|
+
"textLength",
|
|
282
|
+
"textRendering",
|
|
283
|
+
"to",
|
|
284
|
+
"transform",
|
|
285
|
+
"u1",
|
|
286
|
+
"u2",
|
|
287
|
+
"underlinePosition",
|
|
288
|
+
"underlineThickness",
|
|
289
|
+
"unicode",
|
|
290
|
+
"unicodeBidi",
|
|
291
|
+
"unicodeRange",
|
|
292
|
+
"unitsPerEm",
|
|
293
|
+
"vAlphabetic",
|
|
294
|
+
"values",
|
|
295
|
+
"vectorEffect",
|
|
296
|
+
"version",
|
|
297
|
+
"vertAdvY",
|
|
298
|
+
"vertOriginX",
|
|
299
|
+
"vertOriginY",
|
|
300
|
+
"vHanging",
|
|
301
|
+
"vIdeographic",
|
|
302
|
+
"viewTarget",
|
|
303
|
+
"visibility",
|
|
304
|
+
"vMathematical",
|
|
305
|
+
"widths",
|
|
306
|
+
"wordSpacing",
|
|
307
|
+
"writingMode",
|
|
308
|
+
"x1",
|
|
309
|
+
"x2",
|
|
310
|
+
"x",
|
|
311
|
+
"xChannelSelector",
|
|
312
|
+
"xHeight",
|
|
313
|
+
"xlinkActuate",
|
|
314
|
+
"xlinkArcrole",
|
|
315
|
+
"xlinkHref",
|
|
316
|
+
"xlinkRole",
|
|
317
|
+
"xlinkShow",
|
|
318
|
+
"xlinkTitle",
|
|
319
|
+
"xlinkType",
|
|
320
|
+
"xmlBase",
|
|
321
|
+
"xmlLang",
|
|
322
|
+
"xmlns",
|
|
323
|
+
"xmlnsXlink",
|
|
324
|
+
"xmlSpace",
|
|
325
|
+
"y1",
|
|
326
|
+
"y2",
|
|
327
|
+
"y",
|
|
328
|
+
"yChannelSelector",
|
|
329
|
+
"z",
|
|
330
|
+
"zoomAndPan",
|
|
331
|
+
"ref",
|
|
332
|
+
"key",
|
|
333
|
+
"angle"
|
|
334
|
+
];
|
|
28
335
|
//#endregion
|
|
29
|
-
export {
|
|
336
|
+
export { CartesianAxisDefaultProps, FilteredElementKeyMap, SVGElementPropKeys };
|
|
@@ -1,17 +1,22 @@
|
|
|
1
|
-
import { filterProps
|
|
2
|
-
import { createVNode
|
|
1
|
+
import { filterProps } from "../../utils/VueUtils.mjs";
|
|
2
|
+
import { createVNode, mergeProps } from "vue";
|
|
3
3
|
//#region src/cartesian/cartesian-grid/utils.tsx
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Render a grid line item.
|
|
6
|
+
* Priority: slot > default <line> with optional SVG attr overrides from `option`.
|
|
7
|
+
*/
|
|
8
|
+
function renderLineItem(slot, option, props) {
|
|
9
|
+
if (slot) return slot(props);
|
|
10
|
+
const { x1, y1, x2, y2, key, ...others } = { ...props };
|
|
11
|
+
const { offset: __, ...restOfFilteredProps } = filterProps(others, false);
|
|
12
|
+
return createVNode("line", mergeProps(restOfFilteredProps, {
|
|
13
|
+
"x1": x1,
|
|
14
|
+
"y1": y1,
|
|
15
|
+
"x2": x2,
|
|
16
|
+
"y2": y2,
|
|
17
|
+
"fill": "none",
|
|
18
|
+
"key": key
|
|
14
19
|
}), null);
|
|
15
20
|
}
|
|
16
21
|
//#endregion
|
|
17
|
-
export {
|
|
22
|
+
export { renderLineItem };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { selectAxisWithScale
|
|
2
|
-
import { useAppSelector
|
|
3
|
-
import { useChartLayout
|
|
4
|
-
import { Layer
|
|
5
|
-
import { useErrorBarContext
|
|
6
|
-
import { createVNode
|
|
1
|
+
import { selectAxisWithScale } from "../../state/selectors/axisSelectors.mjs";
|
|
2
|
+
import { useAppSelector } from "../../state/hooks.mjs";
|
|
3
|
+
import { useChartLayout } from "../../context/chartLayoutContext.mjs";
|
|
4
|
+
import { Layer } from "../../container/Layer.mjs";
|
|
5
|
+
import { useErrorBarContext, useErrorBarRegistry } from "./ErrorBarContext.mjs";
|
|
6
|
+
import { createVNode, defineComponent, isVNode, onUnmounted } from "vue";
|
|
7
7
|
//#region src/cartesian/error-bar/ErrorBar.tsx
|
|
8
|
-
function
|
|
9
|
-
return typeof
|
|
8
|
+
function _isSlot(s) {
|
|
9
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
10
10
|
}
|
|
11
|
-
var
|
|
11
|
+
var ErrorBarVueProps = {
|
|
12
12
|
dataKey: {
|
|
13
13
|
type: [
|
|
14
14
|
String,
|
|
15
15
|
Number,
|
|
16
16
|
Function
|
|
17
17
|
],
|
|
18
|
-
required:
|
|
18
|
+
required: true
|
|
19
19
|
},
|
|
20
20
|
width: {
|
|
21
21
|
type: Number,
|
|
@@ -30,86 +30,114 @@ var d = {
|
|
|
30
30
|
type: [Number, String],
|
|
31
31
|
default: 1.5
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
};
|
|
34
|
+
var ErrorBar = /* @__PURE__ */ defineComponent({
|
|
34
35
|
name: "ErrorBar",
|
|
35
|
-
props:
|
|
36
|
-
setup(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
props: ErrorBarVueProps,
|
|
37
|
+
setup(props) {
|
|
38
|
+
const layout = useChartLayout();
|
|
39
|
+
const { data, dataPointFormatter, xAxisId, yAxisId, errorBarOffset } = useErrorBarContext();
|
|
40
|
+
const registry = useErrorBarRegistry(null);
|
|
41
|
+
if (registry) {
|
|
42
|
+
const settings = {
|
|
43
|
+
direction: props.direction ?? (layout.value === "horizontal" ? "y" : "x"),
|
|
44
|
+
dataKey: props.dataKey
|
|
42
45
|
};
|
|
43
|
-
|
|
46
|
+
registry.register(settings);
|
|
47
|
+
onUnmounted(() => registry.unregister(settings));
|
|
44
48
|
}
|
|
45
|
-
|
|
49
|
+
const xAxis = useAppSelector((state) => selectAxisWithScale(state, "xAxis", xAxisId, false));
|
|
50
|
+
const yAxis = useAppSelector((state) => selectAxisWithScale(state, "yAxis", yAxisId, false));
|
|
46
51
|
return () => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
52
|
+
const xAxisVal = xAxis.value;
|
|
53
|
+
const yAxisVal = yAxis.value;
|
|
54
|
+
if (xAxisVal?.scale == null || yAxisVal?.scale == null || data.value == null) return null;
|
|
55
|
+
const direction = props.direction ?? (layout.value === "horizontal" ? "y" : "x");
|
|
56
|
+
if (direction === "x" && xAxisVal.type !== "number") return null;
|
|
57
|
+
const offset = errorBarOffset.value;
|
|
58
|
+
const errorBars = data.value.map((entry, dataIndex) => {
|
|
59
|
+
let _slot;
|
|
60
|
+
const { x, y, value, errorVal } = dataPointFormatter(entry, props.dataKey, direction);
|
|
61
|
+
if (!errorVal || x == null || y == null) return null;
|
|
62
|
+
const lineCoordinates = [];
|
|
63
|
+
let lowBound, highBound;
|
|
64
|
+
if (Array.isArray(errorVal)) {
|
|
65
|
+
const [low, high] = errorVal;
|
|
66
|
+
if (low == null || high == null) return null;
|
|
67
|
+
lowBound = low;
|
|
68
|
+
highBound = high;
|
|
69
|
+
} else lowBound = highBound = errorVal;
|
|
70
|
+
if (direction === "x") {
|
|
71
|
+
const { scale } = xAxisVal;
|
|
72
|
+
const yMid = y + offset;
|
|
73
|
+
const yMin = yMid + props.width;
|
|
74
|
+
const yMax = yMid - props.width;
|
|
75
|
+
const xMin = scale(value - lowBound);
|
|
76
|
+
const xMax = scale(value + highBound);
|
|
77
|
+
if (xMin != null && xMax != null) {
|
|
78
|
+
lineCoordinates.push({
|
|
79
|
+
x1: xMax,
|
|
80
|
+
y1: yMin,
|
|
81
|
+
x2: xMax,
|
|
82
|
+
y2: yMax
|
|
83
|
+
});
|
|
84
|
+
lineCoordinates.push({
|
|
85
|
+
x1: xMin,
|
|
86
|
+
y1: yMid,
|
|
87
|
+
x2: xMax,
|
|
88
|
+
y2: yMid
|
|
89
|
+
});
|
|
90
|
+
lineCoordinates.push({
|
|
91
|
+
x1: xMin,
|
|
92
|
+
y1: yMin,
|
|
93
|
+
x2: xMin,
|
|
94
|
+
y2: yMax
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
} else if (direction === "y") {
|
|
98
|
+
const { scale } = yAxisVal;
|
|
99
|
+
const xMid = x + offset;
|
|
100
|
+
const xMin = xMid - props.width;
|
|
101
|
+
const xMax = xMid + props.width;
|
|
102
|
+
const yMin = scale(value - lowBound);
|
|
103
|
+
const yMax = scale(value + highBound);
|
|
104
|
+
if (yMin != null && yMax != null) {
|
|
105
|
+
lineCoordinates.push({
|
|
106
|
+
x1: xMin,
|
|
107
|
+
y1: yMax,
|
|
108
|
+
x2: xMax,
|
|
109
|
+
y2: yMax
|
|
110
|
+
});
|
|
111
|
+
lineCoordinates.push({
|
|
112
|
+
x1: xMid,
|
|
113
|
+
y1: yMin,
|
|
114
|
+
x2: xMid,
|
|
115
|
+
y2: yMax
|
|
116
|
+
});
|
|
117
|
+
lineCoordinates.push({
|
|
118
|
+
x1: xMin,
|
|
119
|
+
y1: yMin,
|
|
120
|
+
x2: xMax,
|
|
121
|
+
y2: yMin
|
|
122
|
+
});
|
|
123
|
+
}
|
|
96
124
|
}
|
|
97
|
-
return
|
|
98
|
-
class: "v-charts-errorBar",
|
|
99
|
-
key: `bar-${
|
|
100
|
-
},
|
|
101
|
-
key: `errorbar-${
|
|
102
|
-
x1:
|
|
103
|
-
y1:
|
|
104
|
-
x2:
|
|
105
|
-
y2:
|
|
106
|
-
stroke:
|
|
107
|
-
"stroke-width":
|
|
108
|
-
}, null))) ?
|
|
125
|
+
return createVNode(Layer, {
|
|
126
|
+
"class": "v-charts-errorBar",
|
|
127
|
+
"key": `bar-${x}-${y}-${value}-${dataIndex}`
|
|
128
|
+
}, _isSlot(_slot = lineCoordinates.map((c, lineIndex) => createVNode("line", {
|
|
129
|
+
"key": `errorbar-${dataIndex}-${c.x1}-${c.y1}-${c.x2}-${c.y2}-${lineIndex}`,
|
|
130
|
+
"x1": c.x1,
|
|
131
|
+
"y1": c.y1,
|
|
132
|
+
"x2": c.x2,
|
|
133
|
+
"y2": c.y2,
|
|
134
|
+
"stroke": props.stroke,
|
|
135
|
+
"stroke-width": props.strokeWidth
|
|
136
|
+
}, null))) ? _slot : { default: () => [_slot] });
|
|
109
137
|
});
|
|
110
|
-
return
|
|
138
|
+
return createVNode(Layer, { "class": "v-charts-errorBars" }, _isSlot(errorBars) ? errorBars : { default: () => [errorBars] });
|
|
111
139
|
};
|
|
112
140
|
}
|
|
113
141
|
});
|
|
114
142
|
//#endregion
|
|
115
|
-
export {
|
|
143
|
+
export { ErrorBar, ErrorBarVueProps };
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
import { shallowRef
|
|
3
|
-
import { createContext
|
|
1
|
+
import { createContext as createContext$1 } from "../../utils/createContext.mjs";
|
|
2
|
+
import { shallowRef } from "vue";
|
|
3
|
+
import { createContext } from "motion-v";
|
|
4
4
|
//#region src/cartesian/error-bar/ErrorBarContext.ts
|
|
5
|
-
var [
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
var [useErrorBarContext, provideErrorBarContext] = createContext("ErrorBarContext");
|
|
6
|
+
var [useErrorBarRegistry, provideErrorBarRegistry] = createContext$1("ErrorBarRegistry");
|
|
7
|
+
function createErrorBarRegistry() {
|
|
8
|
+
const errorBars = shallowRef([]);
|
|
8
9
|
return {
|
|
9
|
-
errorBars
|
|
10
|
-
register(
|
|
11
|
-
|
|
10
|
+
errorBars,
|
|
11
|
+
register(settings) {
|
|
12
|
+
errorBars.value = [...errorBars.value, settings];
|
|
12
13
|
},
|
|
13
|
-
unregister(
|
|
14
|
-
|
|
14
|
+
unregister(settings) {
|
|
15
|
+
errorBars.value = errorBars.value.filter((s) => s !== settings);
|
|
15
16
|
}
|
|
16
17
|
};
|
|
17
18
|
}
|
|
18
19
|
//#endregion
|
|
19
|
-
export {
|
|
20
|
+
export { createErrorBarRegistry, provideErrorBarContext, provideErrorBarRegistry, useErrorBarContext, useErrorBarRegistry };
|