@automattic/charts 0.41.1 → 0.43.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/CHANGELOG.md +22 -8
- package/dist/{chunk-IHUHB3JB.js → chunk-2HB55BRH.js} +31 -43
- package/dist/{chunk-IHUHB3JB.js.map → chunk-2HB55BRH.js.map} +1 -1
- package/dist/{chunk-TEEQFJFL.cjs → chunk-2HUX2CAT.cjs} +51 -3
- package/dist/chunk-2HUX2CAT.cjs.map +1 -0
- package/dist/{chunk-TY64IJ34.js → chunk-3O6FHD2T.js} +51 -3
- package/dist/chunk-3O6FHD2T.js.map +1 -0
- package/dist/{chunk-RUJCC3Q4.cjs → chunk-BZ6UDD37.cjs} +20 -20
- package/dist/{chunk-RUJCC3Q4.cjs.map → chunk-BZ6UDD37.cjs.map} +1 -1
- package/dist/{chunk-LIYP7LQW.js → chunk-DRWOBYEQ.js} +45 -19
- package/dist/chunk-DRWOBYEQ.js.map +1 -0
- package/dist/{chunk-7CSF2X4Q.cjs → chunk-G4FX5I3V.cjs} +48 -60
- package/dist/chunk-G4FX5I3V.cjs.map +1 -0
- package/dist/{chunk-LD4SAJTJ.js → chunk-G66WE3ON.js} +3 -3
- package/dist/{chunk-76XOLO7F.cjs → chunk-GK3XEXVI.cjs} +144 -82
- package/dist/chunk-GK3XEXVI.cjs.map +1 -0
- package/dist/{chunk-OYPAAX3P.js → chunk-KM62I6SD.js} +3 -3
- package/dist/{chunk-UD3QSGWI.js → chunk-Q2LDRQN7.js} +143 -81
- package/dist/chunk-Q2LDRQN7.js.map +1 -0
- package/dist/{chunk-XJSZXQON.cjs → chunk-QLLKOSJ6.cjs} +17 -17
- package/dist/{chunk-XJSZXQON.cjs.map → chunk-QLLKOSJ6.cjs.map} +1 -1
- package/dist/{chunk-LGAG6GQ5.cjs → chunk-SC462VDM.cjs} +11 -11
- package/dist/{chunk-LGAG6GQ5.cjs.map → chunk-SC462VDM.cjs.map} +1 -1
- package/dist/{chunk-CES34TN5.js → chunk-SHADFB3T.js} +2 -2
- package/dist/{chunk-ILOC2UDX.cjs → chunk-UHESRL2F.cjs} +6 -6
- package/dist/{chunk-ILOC2UDX.cjs.map → chunk-UHESRL2F.cjs.map} +1 -1
- package/dist/{chunk-CSSH4P7L.js → chunk-W5RFMC3A.js} +3 -3
- package/dist/{chunk-M3JU5JTP.js → chunk-XDIWMJZD.js} +3 -3
- package/dist/{chunk-BP3IFJ5V.cjs → chunk-ZA7OWPY7.cjs} +16 -16
- package/dist/{chunk-BP3IFJ5V.cjs.map → chunk-ZA7OWPY7.cjs.map} +1 -1
- package/dist/{chunk-HZTHPE5F.cjs → chunk-ZHKI4TVW.cjs} +72 -46
- package/dist/chunk-ZHKI4TVW.cjs.map +1 -0
- package/dist/components/bar-chart/index.cjs +4 -4
- package/dist/components/bar-chart/index.css +22 -0
- package/dist/components/bar-chart/index.css.map +1 -1
- package/dist/components/bar-chart/index.d.cts +2 -2
- package/dist/components/bar-chart/index.d.ts +2 -2
- package/dist/components/bar-chart/index.js +3 -3
- package/dist/components/bar-list-chart/index.cjs +5 -5
- package/dist/components/bar-list-chart/index.css +22 -0
- package/dist/components/bar-list-chart/index.css.map +1 -1
- package/dist/components/bar-list-chart/index.d.cts +2 -2
- package/dist/components/bar-list-chart/index.d.ts +2 -2
- package/dist/components/bar-list-chart/index.js +4 -4
- package/dist/components/conversion-funnel-chart/index.cjs +3 -3
- package/dist/components/conversion-funnel-chart/index.js +2 -2
- package/dist/components/leaderboard-chart/index.cjs +4 -4
- package/dist/components/leaderboard-chart/index.css +22 -0
- package/dist/components/leaderboard-chart/index.css.map +1 -1
- package/dist/components/leaderboard-chart/index.d.cts +2 -2
- package/dist/components/leaderboard-chart/index.d.ts +2 -2
- package/dist/components/leaderboard-chart/index.js +3 -3
- package/dist/components/legend/index.cjs +3 -3
- package/dist/components/legend/index.css +22 -0
- package/dist/components/legend/index.css.map +1 -1
- package/dist/components/legend/index.d.cts +3 -3
- package/dist/components/legend/index.d.ts +3 -3
- package/dist/components/legend/index.js +2 -2
- package/dist/components/line-chart/index.cjs +4 -4
- package/dist/components/line-chart/index.css +22 -0
- package/dist/components/line-chart/index.css.map +1 -1
- package/dist/components/line-chart/index.d.cts +3 -2
- package/dist/components/line-chart/index.d.ts +3 -2
- package/dist/components/line-chart/index.js +3 -3
- package/dist/components/pie-chart/index.cjs +4 -4
- package/dist/components/pie-chart/index.css +22 -0
- package/dist/components/pie-chart/index.css.map +1 -1
- package/dist/components/pie-chart/index.d.cts +3 -3
- package/dist/components/pie-chart/index.d.ts +3 -3
- package/dist/components/pie-chart/index.js +3 -3
- package/dist/components/pie-semi-circle-chart/index.cjs +4 -4
- package/dist/components/pie-semi-circle-chart/index.css +22 -0
- package/dist/components/pie-semi-circle-chart/index.css.map +1 -1
- package/dist/components/pie-semi-circle-chart/index.d.cts +3 -3
- package/dist/components/pie-semi-circle-chart/index.d.ts +3 -3
- package/dist/components/pie-semi-circle-chart/index.js +3 -3
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +13 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +22 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +13 -11
- package/dist/{leaderboard-chart-CPwbMH2m.d.ts → leaderboard-chart-By0W6-PK.d.ts} +1 -1
- package/dist/{leaderboard-chart-0L0WHLB8.d.cts → leaderboard-chart-DnrgthFl.d.cts} +1 -1
- package/dist/{legend-CpXHpy43.d.cts → legend-C9ahiwOt.d.cts} +1 -1
- package/dist/{legend-CiRaC2E5.d.ts → legend-jjMmhSg3.d.ts} +1 -1
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.d.cts +2 -2
- package/dist/providers/index.d.ts +2 -2
- package/dist/providers/index.js +1 -1
- package/dist/{themes-CiIUyHWe.d.cts → themes-CzAoZ_JO.d.cts} +4 -1
- package/dist/{themes-NKtjcCQP.d.ts → themes-bkPMQyLm.d.ts} +4 -1
- package/dist/{types-wJz7SVob.d.cts → types-BBwg4Evw.d.cts} +1 -1
- package/dist/{types-DK1CMp9i.d.cts → types-C05PdDJa.d.cts} +9 -0
- package/dist/{types-DK1CMp9i.d.ts → types-C05PdDJa.d.ts} +9 -0
- package/dist/{types-DQv1GcN4.d.ts → types-DQNnq5Fr.d.ts} +1 -1
- package/package.json +1 -1
- package/src/components/leaderboard-chart/leaderboard-chart.tsx +1 -9
- package/src/components/legend/legend.tsx +1 -1
- package/src/components/legend/private/base-legend.module.scss +28 -0
- package/src/components/legend/private/base-legend.tsx +148 -71
- package/src/components/legend/test/legend.test.tsx +119 -0
- package/src/components/legend/types.ts +9 -0
- package/src/components/line-chart/line-chart.tsx +54 -18
- package/src/components/line-chart/test/line-chart.test.tsx +106 -0
- package/src/components/line-chart/types.ts +1 -0
- package/src/index.ts +1 -1
- package/src/providers/chart-context/global-charts-provider.tsx +57 -1
- package/src/providers/chart-context/test/chart-context.test.tsx +269 -1
- package/src/providers/chart-context/types.ts +4 -0
- package/dist/chunk-76XOLO7F.cjs.map +0 -1
- package/dist/chunk-7CSF2X4Q.cjs.map +0 -1
- package/dist/chunk-HZTHPE5F.cjs.map +0 -1
- package/dist/chunk-LIYP7LQW.js.map +0 -1
- package/dist/chunk-TEEQFJFL.cjs.map +0 -1
- package/dist/chunk-TY64IJ34.js.map +0 -1
- package/dist/chunk-UD3QSGWI.js.map +0 -1
- /package/dist/{chunk-LD4SAJTJ.js.map → chunk-G66WE3ON.js.map} +0 -0
- /package/dist/{chunk-OYPAAX3P.js.map → chunk-KM62I6SD.js.map} +0 -0
- /package/dist/{chunk-CES34TN5.js.map → chunk-SHADFB3T.js.map} +0 -0
- /package/dist/{chunk-CSSH4P7L.js.map → chunk-W5RFMC3A.js.map} +0 -0
- /package/dist/{chunk-M3JU5JTP.js.map → chunk-XDIWMJZD.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,19 +5,31 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.43.0] - 2025-10-20
|
|
9
|
+
### Added
|
|
10
|
+
- Add legend interactivity. [#45506]
|
|
11
|
+
- Show ticks in year format when the interval is more than a year. [#45529]
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Charts: Group Storybook controls. [#45503]
|
|
15
|
+
|
|
16
|
+
## [0.42.0] - 2025-10-14
|
|
17
|
+
### Changed
|
|
18
|
+
- Leaderboard chart: Update exports and layout flex behavior. [#45480]
|
|
19
|
+
|
|
8
20
|
## [0.41.1] - 2025-10-13
|
|
9
21
|
### Fixed
|
|
10
22
|
- Fix conversion funnel height inconsistency when toggling comparison mode. [#45434]
|
|
11
23
|
|
|
12
24
|
## [0.41.0] - 2025-10-08
|
|
13
25
|
### Added
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
26
|
+
- Add custom legend support. [#45347]
|
|
27
|
+
- Set the color of the axis labels via the theme. [#45406]
|
|
28
|
+
- Legend: Update docs. [#45391]
|
|
17
29
|
- Show ticks in hours when the interval is less than 24 hours. [#45390]
|
|
18
30
|
|
|
19
31
|
### Changed
|
|
20
|
-
-
|
|
32
|
+
- Separate API reference documentation from usage documentation. [#45322]
|
|
21
33
|
|
|
22
34
|
## [0.40.0] - 2025-10-06
|
|
23
35
|
### Added
|
|
@@ -47,14 +59,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
47
59
|
|
|
48
60
|
## [0.38.0] - 2025-09-19
|
|
49
61
|
### Added
|
|
50
|
-
-
|
|
62
|
+
- Add get element styles utility to global context. [#45207]
|
|
51
63
|
|
|
52
64
|
### Changed
|
|
53
65
|
- Update package dependencies. [#45229]
|
|
54
66
|
|
|
55
67
|
## [0.37.0] - 2025-09-15
|
|
56
68
|
### Changed
|
|
57
|
-
-
|
|
69
|
+
- Handle legend overflow when not enough space. [#45144]
|
|
58
70
|
|
|
59
71
|
## [0.36.0] - 2025-09-11
|
|
60
72
|
### Added
|
|
@@ -69,11 +81,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
69
81
|
- Export all unresponsive charts. [#45129]
|
|
70
82
|
|
|
71
83
|
### Removed
|
|
72
|
-
-
|
|
84
|
+
- Deprecate ThemeProvider in favor of GlobalChartsProvider. [#45081]
|
|
73
85
|
|
|
74
86
|
## [0.34.1] - 2025-09-08
|
|
75
87
|
### Fixed
|
|
76
|
-
-
|
|
88
|
+
- Fix Type error with legendValueDisplay. [#45099]
|
|
77
89
|
|
|
78
90
|
## [0.34.0] - 2025-09-08
|
|
79
91
|
### Changed
|
|
@@ -507,6 +519,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
507
519
|
- Fixed lints following ESLint rule changes for TS [#40584]
|
|
508
520
|
- Fixing a bug in Chart storybook data. [#40640]
|
|
509
521
|
|
|
522
|
+
[0.43.0]: https://github.com/Automattic/charts/compare/v0.42.0...v0.43.0
|
|
523
|
+
[0.42.0]: https://github.com/Automattic/charts/compare/v0.41.1...v0.42.0
|
|
510
524
|
[0.41.1]: https://github.com/Automattic/charts/compare/v0.41.0...v0.41.1
|
|
511
525
|
[0.41.0]: https://github.com/Automattic/charts/compare/v0.40.0...v0.41.0
|
|
512
526
|
[0.40.0]: https://github.com/Automattic/charts/compare/v0.39.0...v0.40.0
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
Legend,
|
|
9
9
|
SingleChartContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-Q2LDRQN7.js";
|
|
11
11
|
import {
|
|
12
12
|
GlobalChartsContext,
|
|
13
13
|
GlobalChartsProvider,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
useChartRegistration,
|
|
18
18
|
useGlobalChartsContext,
|
|
19
19
|
useGlobalChartsTheme
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3O6FHD2T.js";
|
|
21
21
|
import {
|
|
22
22
|
__commonJS,
|
|
23
23
|
__export,
|
|
@@ -4374,46 +4374,34 @@ var LeaderboardChartInternal = ({
|
|
|
4374
4374
|
gap: showLegend ? "16px" : "0"
|
|
4375
4375
|
},
|
|
4376
4376
|
children: [
|
|
4377
|
-
/* @__PURE__ */ jsx3(
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
}
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
[leaderboard_chart_module_default.overlayLabel]: withOverlayLabel
|
|
4406
|
-
}),
|
|
4407
|
-
children: [
|
|
4408
|
-
/* @__PURE__ */ jsx3(component_default4, { children: valueFormatter(entry.currentValue) }),
|
|
4409
|
-
withComparison && /* @__PURE__ */ jsx3(component_default4, { style: { color: deltaColor }, children: deltaFormatter(entry.delta) })
|
|
4410
|
-
]
|
|
4411
|
-
}
|
|
4412
|
-
)
|
|
4413
|
-
] }, entry.id);
|
|
4414
|
-
})
|
|
4415
|
-
}
|
|
4416
|
-
),
|
|
4377
|
+
/* @__PURE__ */ jsx3(component_default6, { templateColumns: "minmax(0, 1fr) auto", rowGap, columnGap, children: data.map((entry) => {
|
|
4378
|
+
const colorIndex = Math.sign(entry.delta) + 1;
|
|
4379
|
+
const deltaColor = deltaColors[colorIndex];
|
|
4380
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4381
|
+
/* @__PURE__ */ jsx3(component_default5, { spacing: labelSpacing, children: /* @__PURE__ */ jsx3(
|
|
4382
|
+
BarWithLabel,
|
|
4383
|
+
{
|
|
4384
|
+
entry,
|
|
4385
|
+
withComparison,
|
|
4386
|
+
withOverlayLabel,
|
|
4387
|
+
primaryColor: resolvedPrimaryColor,
|
|
4388
|
+
secondaryColor: resolvedSecondaryColor
|
|
4389
|
+
}
|
|
4390
|
+
) }),
|
|
4391
|
+
/* @__PURE__ */ jsxs(
|
|
4392
|
+
"div",
|
|
4393
|
+
{
|
|
4394
|
+
className: clsx(leaderboard_chart_module_default.valueContainer, {
|
|
4395
|
+
[leaderboard_chart_module_default.overlayLabel]: withOverlayLabel
|
|
4396
|
+
}),
|
|
4397
|
+
children: [
|
|
4398
|
+
/* @__PURE__ */ jsx3(component_default4, { children: valueFormatter(entry.currentValue) }),
|
|
4399
|
+
withComparison && /* @__PURE__ */ jsx3(component_default4, { style: { color: deltaColor }, children: deltaFormatter(entry.delta) })
|
|
4400
|
+
]
|
|
4401
|
+
}
|
|
4402
|
+
)
|
|
4403
|
+
] }, entry.id);
|
|
4404
|
+
}) }),
|
|
4417
4405
|
showLegend && /* @__PURE__ */ jsx3(
|
|
4418
4406
|
Legend,
|
|
4419
4407
|
{
|
|
@@ -4486,4 +4474,4 @@ is-plain-object/dist/is-plain-object.mjs:
|
|
|
4486
4474
|
* Released under the MIT License.
|
|
4487
4475
|
*)
|
|
4488
4476
|
*/
|
|
4489
|
-
//# sourceMappingURL=chunk-
|
|
4477
|
+
//# sourceMappingURL=chunk-2HB55BRH.js.map
|