@sckyzo/cosmos-charts 0.0.2 → 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/CHANGELOG.md +31 -0
- package/README.md +26 -12
- package/dist/index.cjs +719 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +190 -16
- package/dist/index.d.ts +190 -16
- package/dist/index.js +712 -29
- package/dist/index.js.map +1 -1
- package/package.json +11 -12
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,37 @@ All notable changes to `@sckyzo/cosmos-charts` are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.2.0](https://github.com/SckyzO/cosmos/compare/@sckyzo/cosmos-charts@0.1.1...@sckyzo/cosmos-charts@0.2.0) (2026-10-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **charts:** add BoxPlotChart ([83e812e](https://github.com/SckyzO/cosmos/commit/83e812e7f42e5ce0117be5080a06a7a70d3cf76e)), closes [#157](https://github.com/SckyzO/cosmos/issues/157)
|
|
14
|
+
* **charts:** add HeatmapChart ([eb7f363](https://github.com/SckyzO/cosmos/commit/eb7f363c0c958f6d7ec49ed6eee6a8354fc4b579)), closes [#157](https://github.com/SckyzO/cosmos/issues/157)
|
|
15
|
+
* **charts:** add MixedChart ([9657c84](https://github.com/SckyzO/cosmos/commit/9657c84d83c9cd8b0f82444b61fe1b499ad241f0)), closes [#157](https://github.com/SckyzO/cosmos/issues/157)
|
|
16
|
+
* **charts:** add RadarChart ([8f97184](https://github.com/SckyzO/cosmos/commit/8f9718421613d4e448826e3bc627986cfa772bae)), closes [#157](https://github.com/SckyzO/cosmos/issues/157)
|
|
17
|
+
* **charts:** add RangeBarChart ([a58030a](https://github.com/SckyzO/cosmos/commit/a58030a8e8324c549ac780141931f3405cd22f57)), closes [#157](https://github.com/SckyzO/cosmos/issues/157)
|
|
18
|
+
* **charts:** add ScatterChart and BubbleChart ([0ce481b](https://github.com/SckyzO/cosmos/commit/0ce481be8e062088f979f076a21eba874ad84be2)), closes [#157](https://github.com/SckyzO/cosmos/issues/157)
|
|
19
|
+
|
|
20
|
+
## [0.1.1](https://github.com/SckyzO/cosmos/compare/@sckyzo/cosmos-charts@0.1.0...@sckyzo/cosmos-charts@0.1.1) (2026-10-21)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* **charts:** escape series names, categories and labels in HTML output ([c0b7137](https://github.com/SckyzO/cosmos/commit/c0b71379b1ce6f5b449eb64e8198ad5dd1bde27e))
|
|
26
|
+
|
|
27
|
+
## [0.1.0](https://github.com/SckyzO/cosmos/compare/@sckyzo/cosmos-charts@0.0.2...@sckyzo/cosmos-charts@0.1.0) (2026-10-20)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* **charts:** follow the deep-blue theme and the accent color ([174f255](https://github.com/SckyzO/cosmos/commit/174f25578e45e78ca5688b7f032b812b74f763e4))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
* **charts:** keep LineAreaChart y-axis labels after a theme change ([bf0cc6d](https://github.com/SckyzO/cosmos/commit/bf0cc6d843df2c60386b4ce6321b1a4f7b473c06))
|
|
38
|
+
|
|
8
39
|
## [0.0.2] - 2026-05-21
|
|
9
40
|
|
|
10
41
|
Packaging/metadata only — no component or API changes.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @sckyzo/cosmos-charts
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@sckyzo/cosmos-charts)
|
|
4
|
+
|
|
3
5
|
Cosmos charts — opinionated [ApexCharts](https://apexcharts.com/) wrappers themed for the Cosmos design system.
|
|
4
6
|
|
|
5
7
|
Kept in a dedicated subpackage so that `@sckyzo/cosmos-react` consumers who don't render charts don't ship the ApexCharts bundle.
|
|
@@ -8,6 +10,7 @@ Kept in a dedicated subpackage so that `@sckyzo/cosmos-react` consumers who don'
|
|
|
8
10
|
|
|
9
11
|
```bash
|
|
10
12
|
pnpm add @sckyzo/cosmos-charts
|
|
13
|
+
pnpm add react react-dom # peers, react 19+
|
|
11
14
|
```
|
|
12
15
|
|
|
13
16
|
## Use
|
|
@@ -21,18 +24,29 @@ import { LineAreaChart, RealtimeChart, useChartTheme } from '@sckyzo/cosmos-char
|
|
|
21
24
|
/>;
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
The included `useChartTheme()` hook adapts ApexCharts grid + axis tokens to the current Cosmos
|
|
27
|
+
The included `useChartTheme()` hook adapts ApexCharts grid + axis tokens and the brand color to the current Cosmos theme and accent: it subscribes to the theme class (`dark` and `deep-blue` render dark charts) and `data-accent` on `<html>`, and reads `--color-brand-500` and the gray scale from the CSS. `COSMOS_BRAND` is the default blue; use `useChartTheme().brand` to follow the accent. `brandScale` is a sequential scale of five brand steps, low to high (pale to deep in light themes, dark to bright in dark ones), and `surface` the card background; `HeatmapChart` uses both.
|
|
25
28
|
|
|
26
29
|
## Charts shipped
|
|
27
30
|
|
|
28
|
-
| Chart | Notes
|
|
29
|
-
| --------------------------------- |
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
31
|
+
| Chart | Notes |
|
|
32
|
+
| --------------------------------- | ------------------------------------------------------ |
|
|
33
|
+
| `BarChart` | Vertical or horizontal bars |
|
|
34
|
+
| `RangeBarChart` | Time ranges per row on a datetime axis (timeline) |
|
|
35
|
+
| `MixedChart` | Columns and lines on one chart, optional second y axis |
|
|
36
|
+
| `LineAreaChart` | Smooth area + gradient fill |
|
|
37
|
+
| `RealtimeChart` | Live updates with WARN/CRIT threshold annotations |
|
|
38
|
+
| `RadialBarChart` | Multi-series radial gauge |
|
|
39
|
+
| `GradientRadial` | Single gradient radial |
|
|
40
|
+
| `SemiCircleGauge` | Half-donut gauge |
|
|
41
|
+
| `StrokedGauge` | Dashed-stroke radial |
|
|
42
|
+
| `DonutChart` / `DonutRightLegend` | Donut with bottom or right legend |
|
|
43
|
+
| `Sparkline` / `SparklineGroup` | Mini sparklines + KPI grid |
|
|
44
|
+
| `TreemapChart` | Repartition treemap |
|
|
45
|
+
| `HeatmapChart` | Rows × columns colored by value buckets or ranges |
|
|
46
|
+
| `RadarChart` | One polygon per series over named axes |
|
|
47
|
+
| `ScatterChart` / `BubbleChart` | Numeric x/y points; bubble size as a 3rd measure |
|
|
48
|
+
| `BoxPlotChart` | Min/quartiles/max boxes, vertical or horizontal |
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
MIT — see [LICENSE](../../LICENSE).
|