@pushwoosh/kit-charts 0.0.1 → 0.0.3
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/ai-documentation.md +19 -0
- package/core/Chart/Axes.js +38 -51
- package/core/Chart/Chart.js +45 -53
- package/core/Chart/Hinted.js +1 -2
- package/core/Chart/Legend.js +14 -15
- package/core/Chart/PlotDecorations.js +63 -36
- package/core/Chart/StackLabels.js +6 -7
- package/core/Chart/Titles.js +14 -17
- package/core/Chart/Tooltip.js +12 -13
- package/core/data/points.js +1 -1
- package/core/geometry/path.js +1 -2
- package/core/layout/legend-layout.js +12 -12
- package/core/layout/measure-text.d.ts +5 -0
- package/core/layout/measure-text.js +8 -3
- package/core/layout/metrics.d.ts +7 -0
- package/core/layout/metrics.js +7 -0
- package/core/layout/title-layout.js +9 -15
- package/core/model/build-model.js +44 -69
- package/core/model/palette.d.ts +8 -0
- package/core/model/palette.js +31 -0
- package/core/options/normalize.js +1 -2
- package/core/registry/registry.js +1 -1
- package/core/types/options.d.ts +4 -0
- package/package.json +2 -2
- package/series/area/area.js +2 -3
- package/series/column/column.js +4 -8
- package/series/heatmap/heatmap.js +5 -8
- package/series/line/line.js +2 -3
- package/series/pie/pie.js +6 -8
- package/series/shared/DataLabels.js +8 -8
- package/series/shared/Markers.js +8 -8
package/series/shared/Markers.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const markerRadius = marker =>
|
|
2
|
+
const markerRadius = marker => marker?.radius ?? (marker?.width ? marker.width / 2 : 3);
|
|
3
3
|
export function Markers({
|
|
4
4
|
marker,
|
|
5
5
|
projected,
|
|
6
6
|
color
|
|
7
7
|
}) {
|
|
8
|
-
if (
|
|
8
|
+
if (marker?.enabled === false || marker?.symbol === 'none') {
|
|
9
9
|
return null;
|
|
10
10
|
}
|
|
11
11
|
const radius = markerRadius(marker);
|
|
12
|
-
const fill =
|
|
13
|
-
const square =
|
|
12
|
+
const fill = marker?.fillColor ?? color;
|
|
13
|
+
const square = marker?.symbol === 'square';
|
|
14
14
|
return projected.map(({
|
|
15
15
|
point,
|
|
16
16
|
px,
|
|
@@ -21,14 +21,14 @@ export function Markers({
|
|
|
21
21
|
width: radius * 2,
|
|
22
22
|
height: radius * 2,
|
|
23
23
|
fill: fill,
|
|
24
|
-
stroke: marker
|
|
25
|
-
strokeWidth: marker
|
|
24
|
+
stroke: marker?.lineColor,
|
|
25
|
+
strokeWidth: marker?.lineWidth
|
|
26
26
|
}, `m-${point.index}`) : _jsx("circle", {
|
|
27
27
|
cx: px,
|
|
28
28
|
cy: py,
|
|
29
29
|
r: radius,
|
|
30
30
|
fill: fill,
|
|
31
|
-
stroke: marker
|
|
32
|
-
strokeWidth: marker
|
|
31
|
+
stroke: marker?.lineColor,
|
|
32
|
+
strokeWidth: marker?.lineWidth
|
|
33
33
|
}, `m-${point.index}`));
|
|
34
34
|
}
|