@chipmobilesdk/rn-chart 0.1.0 → 0.1.1
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/package.json +10 -9
- package/skills/sdk-rn-chart/SKILL.md +69 -0
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chipmobilesdk/rn-chart",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"private": false,
|
|
5
|
-
"license": "UNLICENSED",
|
|
6
|
-
"main": "src/index.ts",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"main": "src/index.ts",
|
|
7
7
|
"types": "src/index.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"src/react",
|
|
21
21
|
"src/render",
|
|
22
22
|
"src/validation",
|
|
23
|
+
"skills",
|
|
23
24
|
"README.md",
|
|
24
25
|
"CHANGELOG.md"
|
|
25
26
|
],
|
|
@@ -41,8 +42,8 @@
|
|
|
41
42
|
"engines": {
|
|
42
43
|
"node": ">=22.11.0"
|
|
43
44
|
},
|
|
44
|
-
"publishConfig": {
|
|
45
|
-
"access": "public",
|
|
46
|
-
"registry": "https://registry.npmjs.org/"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public",
|
|
47
|
+
"registry": "https://registry.npmjs.org/"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdk-rn-chart
|
|
3
|
+
description: "Charts via @chipmobilesdk/rn-chart: datasource contract, series theming, legends, selection, dataset budgets, chart accessibility. Use when rendering a chart, wiring chart data, theming series, or hitting a dataset size limit."
|
|
4
|
+
metadata:
|
|
5
|
+
package: "@chipmobilesdk/rn-chart"
|
|
6
|
+
packageVersion: "0.1.0"
|
|
7
|
+
user-invocable: true
|
|
8
|
+
disable-model-invocation: false
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# @chipmobilesdk/rn-chart
|
|
12
|
+
|
|
13
|
+
Chart rendering with an explicit datasource contract, its own theme provider,
|
|
14
|
+
accessibility support and enforced dataset budgets.
|
|
15
|
+
|
|
16
|
+
## Use this when
|
|
17
|
+
|
|
18
|
+
- Rendering any chart or adding a series
|
|
19
|
+
- Shaping data to the datasource contract
|
|
20
|
+
- Theming series colors or building a legend
|
|
21
|
+
- Handling selection / interaction on a chart
|
|
22
|
+
- A chart refuses to render a large dataset
|
|
23
|
+
|
|
24
|
+
## Check what it deliberately does not do
|
|
25
|
+
|
|
26
|
+
The README opens with `## What it does not do`. Read that first — it prevents building
|
|
27
|
+
a feature this package intentionally excludes.
|
|
28
|
+
|
|
29
|
+
## Datasets are budgeted
|
|
30
|
+
|
|
31
|
+
`DATASET_BUDGETS` and `checkBudget` enforce size limits so charts stay at 60 FPS on
|
|
32
|
+
low-end devices. When a budget is exceeded, aggregate or window the data — do not raise
|
|
33
|
+
the budget. See `## Dataset budgets`.
|
|
34
|
+
|
|
35
|
+
## Chart theming is separate from app theming
|
|
36
|
+
|
|
37
|
+
Charts use `ChartThemeProvider` / `useChartTheme`, not the app-wide theme provider from
|
|
38
|
+
`sdk-rn-theme`. Series colors come from `resolveSeriesColor`, never from hardcoded values.
|
|
39
|
+
|
|
40
|
+
## Public API (v0.1.0)
|
|
41
|
+
|
|
42
|
+
Runtime:
|
|
43
|
+
|
|
44
|
+
- `ChartThemeProvider`, `useChartTheme`, `defaultChartTheme`, `resolveSeriesColor`
|
|
45
|
+
- `ChartLegend`, `buildLegendEntries`
|
|
46
|
+
- `findTarget`, `isUsableTarget`, `readProgress`, `sameSelection`
|
|
47
|
+
- `DATASET_BUDGETS`, `checkBudget`
|
|
48
|
+
- `isChartError`
|
|
49
|
+
|
|
50
|
+
Types: `MarkerKind`, `ProgressReading`, `ReferenceMarker`, `BudgetCheck`, `DatasetBudget`
|
|
51
|
+
|
|
52
|
+
Use `sameSelection` for selection equality — comparing selection objects by reference
|
|
53
|
+
causes redundant re-renders.
|
|
54
|
+
|
|
55
|
+
## Where the detail lives
|
|
56
|
+
|
|
57
|
+
Read one section of `node_modules/@chipmobilesdk/rn-chart/README.md` (~360 lines):
|
|
58
|
+
|
|
59
|
+
| Need | Section |
|
|
60
|
+
|---|---|
|
|
61
|
+
| Scope check | `## What it does not do` |
|
|
62
|
+
| First integration | `## Install`, `## Quick start` |
|
|
63
|
+
| Shaping data | `## The datasource contract`, `## Value semantics` |
|
|
64
|
+
| Loading/empty/error rendering | `## States` |
|
|
65
|
+
| Touch and selection | `## Interaction` |
|
|
66
|
+
| Colors and legends | `## Theming` |
|
|
67
|
+
| Axis/label formatting | `## Formatting` |
|
|
68
|
+
| Screen reader support | `## Accessibility` |
|
|
69
|
+
| Size limits | `## Dataset budgets` |
|