@ruckc/truss-chart 1.27.0 → 1.29.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.
Files changed (2) hide show
  1. package/README.md +30 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # @ruckc/truss-chart
2
+
3
+ Zero-dependency SVG charts for [Truss UI](https://truss.ruck.io): line and area, bar, donut, histogram, scatter, density, sparkline, stat tiles and a colour scale. Responsive, keyboard-readable, with a table toggle for the underlying values, and themed from the Truss tokens in light and dark.
4
+
5
+ Docs: <https://truss.ruck.io/docs/packages>
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @ruckc/truss-chart
11
+ ```
12
+
13
+ `svelte` (^5.20) is a peer dependency.
14
+
15
+ ## Usage
16
+
17
+ ```svelte
18
+ <script lang="ts">
19
+ import '@ruckc/truss-chart/charts.css'; // the series, sequential and diverging palettes
20
+ import { LineChart, BarChart, StatTile } from '@ruckc/truss-chart';
21
+ </script>
22
+
23
+ <LineChart title="Traffic" {x} series={[{ name: 'Requests', values }]} />
24
+ <BarChart categories={['Q1', 'Q2']} {series} stacked="percent" />
25
+ <StatTile label="Requests" value={12840} delta={0.12} />
26
+ ```
27
+
28
+ ## License
29
+
30
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruckc/truss-chart",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "description": "Zero-dependency SVG charts for Truss UI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,7 +8,8 @@
8
8
  "package": "svelte-package -i src/lib -o dist"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "README.md"
12
13
  ],
13
14
  "sideEffects": [
14
15
  "**/*.css"