@adecore/charts 0.54.2 → 0.54.4
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/README.md +1 -1
- package/dist/locales/en.js +2 -2
- package/dist/locales/nl.js +1 -1
- package/package.json +3 -3
- package/src/Root.tsx +3 -3
- package/src/locales/en.ts +2 -2
- package/src/locales/nl.ts +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @adecore/charts
|
|
2
2
|
|
|
3
|
-
Charts in the theme of [`@adecore/ui`](https://adecore.dev/ui/): lines, areas and columns over time or per category, scatters with a legend of many series, heatmaps, trace timelines and sparklines, with markers and bands, a tooltip, a legend and a table of values. A chart follows the width of its container
|
|
3
|
+
Charts in the theme of [`@adecore/ui`](https://adecore.dev/ui/): lines, areas and columns over time or per category, scatters with a legend of many series, heatmaps, trace timelines and sparklines, with markers and bands, a tooltip, a legend and a table of values. A chart follows the width of its container and draws on whole pixels. It takes one tab stop, and a screen reader reads it bucket by bucket. `d3-scale` and `d3-shape` do the math.
|
|
4
4
|
|
|
5
5
|
**[Documentation](https://adecore.dev/charts/)**
|
|
6
6
|
|
package/dist/locales/en.js
CHANGED
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
start: 'starts at +{{offset}}',
|
|
22
22
|
duration: 'takes {{duration}}',
|
|
23
23
|
moment: '{{label}} at +{{offset}}',
|
|
24
|
-
keyboard: 'Up and
|
|
24
|
+
keyboard: 'Up and Down move between rows, Right opens a row and Left closes it, Enter shows its details.'
|
|
25
25
|
},
|
|
26
26
|
keyboard: {
|
|
27
27
|
move: 'Arrow keys move between values, Home and End go to the ends, Escape clears.',
|
|
@@ -34,6 +34,6 @@ export default {
|
|
|
34
34
|
name: 'heatmap',
|
|
35
35
|
less: 'Less',
|
|
36
36
|
more: 'More',
|
|
37
|
-
keyboard: 'Arrow keys move between cells
|
|
37
|
+
keyboard: 'Arrow keys move between cells. Home and End go to the ends of a row, or with Control to the first and the last cell. Escape clears.'
|
|
38
38
|
}
|
|
39
39
|
};
|
package/dist/locales/nl.js
CHANGED
|
@@ -34,6 +34,6 @@ export default {
|
|
|
34
34
|
name: 'heatmap',
|
|
35
35
|
less: 'Minder',
|
|
36
36
|
more: 'Meer',
|
|
37
|
-
keyboard: 'Pijltjestoetsen gaan langs de cellen
|
|
37
|
+
keyboard: 'Pijltjestoetsen gaan langs de cellen. Home en End gaan naar het begin en het eind van een rij, of met Control naar de eerste en de laatste cel. Escape wist.'
|
|
38
38
|
}
|
|
39
39
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adecore/charts",
|
|
3
|
-
"version": "0.54.
|
|
3
|
+
"version": "0.54.4",
|
|
4
4
|
"description": "Series charts, scatters, heatmaps, trace timelines and sparklines in the theme of @adecore/ui, readable by keyboard and screen reader.",
|
|
5
5
|
"license": "FSL-1.1-MIT",
|
|
6
6
|
"author": "Bas Milius",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"lucide-react": "^1.65.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"@adecore/ui": "^0.54.
|
|
46
|
+
"@adecore/ui": "^0.54.4",
|
|
47
47
|
"i18next": "^26.4.2",
|
|
48
48
|
"react": "^19.3.0",
|
|
49
49
|
"react-dom": "^19.3.0",
|
|
50
50
|
"react-i18next": "^17.0.15"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@adecore/ui": "0.54.
|
|
53
|
+
"@adecore/ui": "0.54.4",
|
|
54
54
|
"@types/bun": "^1.4.4",
|
|
55
55
|
"@types/react": "^19.3.0",
|
|
56
56
|
"@types/react-dom": "^19.3.0",
|
package/src/Root.tsx
CHANGED
|
@@ -215,7 +215,7 @@ export function ChartRoot<Row>({
|
|
|
215
215
|
}
|
|
216
216
|
}, [orientation, band, dropped]);
|
|
217
217
|
|
|
218
|
-
//
|
|
218
|
+
// Kept by hand: the compiled code would run these accessors again on every move of the cursor.
|
|
219
219
|
const { xs, keys, rowLabels, groupKeys, groupLabels } = useMemo(() => {
|
|
220
220
|
const xs = data.map((row, index) => {
|
|
221
221
|
const value = readValue(x, row, index);
|
|
@@ -248,7 +248,7 @@ export function ChartRoot<Row>({
|
|
|
248
248
|
const marginLeft = margin.left ?? inset;
|
|
249
249
|
const marginRight = margin.right ?? inset;
|
|
250
250
|
|
|
251
|
-
//
|
|
251
|
+
// Kept by hand: the compiled code would measure the bands again on a render that only moves the cursor.
|
|
252
252
|
const layout = useMemo(
|
|
253
253
|
() =>
|
|
254
254
|
horizontal
|
|
@@ -262,7 +262,7 @@ export function ChartRoot<Row>({
|
|
|
262
262
|
const width = layout === null || horizontal ? room : Math.max(room, Math.ceil(layout.width + marginLeft + marginRight));
|
|
263
263
|
const scrolls = layout !== null && width > room;
|
|
264
264
|
// A scrolling plot clips what hangs out of its first buckets, such as a value label or a slanted name, so the
|
|
265
|
-
// scroller reaches over the y axis by its width and gives that back as padding
|
|
265
|
+
// scroller reaches over the y axis by its width and gives that back as padding, so the plot stays where it was.
|
|
266
266
|
const overhang = scrolls ? leftAxis : 0;
|
|
267
267
|
const scrollbars = useOverlayScrollbars(scrolls ? scrollBox : null, { axis: 'x' });
|
|
268
268
|
const xRows = [...xAxes.values()];
|
package/src/locales/en.ts
CHANGED
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
start: 'starts at +{{offset}}',
|
|
22
22
|
duration: 'takes {{duration}}',
|
|
23
23
|
moment: '{{label}} at +{{offset}}',
|
|
24
|
-
keyboard: 'Up and
|
|
24
|
+
keyboard: 'Up and Down move between rows, Right opens a row and Left closes it, Enter shows its details.'
|
|
25
25
|
},
|
|
26
26
|
keyboard: {
|
|
27
27
|
move: 'Arrow keys move between values, Home and End go to the ends, Escape clears.',
|
|
@@ -34,6 +34,6 @@ export default {
|
|
|
34
34
|
name: 'heatmap',
|
|
35
35
|
less: 'Less',
|
|
36
36
|
more: 'More',
|
|
37
|
-
keyboard: 'Arrow keys move between cells
|
|
37
|
+
keyboard: 'Arrow keys move between cells. Home and End go to the ends of a row, or with Control to the first and the last cell. Escape clears.'
|
|
38
38
|
}
|
|
39
39
|
};
|
package/src/locales/nl.ts
CHANGED
|
@@ -35,6 +35,6 @@ export default {
|
|
|
35
35
|
less: 'Minder',
|
|
36
36
|
more: 'Meer',
|
|
37
37
|
keyboard:
|
|
38
|
-
'Pijltjestoetsen gaan langs de cellen
|
|
38
|
+
'Pijltjestoetsen gaan langs de cellen. Home en End gaan naar het begin en het eind van een rij, of met Control naar de eerste en de laatste cel. Escape wist.'
|
|
39
39
|
}
|
|
40
40
|
};
|