@fundar/data-chart-telling 1.8.0 → 1.8.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/CHANGELOG.md +6 -0
- package/dist/layout/styles/ValueLabels.js +1 -1
- package/dist/plots/correlation/scatter/markers.js +1 -1
- package/dist/plots/distribution/histogram/markers.js +1 -1
- package/dist/plots/distribution/pyramid/markers.js +1 -1
- package/dist/plots/ranking/bar/markers.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres to [Semantic Versioning](https://semver.org/).
|
|
4
4
|
|
|
5
|
+
## [1.8.1] - 2026-11-02
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- `styles.values.format` gets the labelled row as its third argument on `BarPlot`, `PyramidPlot`, `HistogramPlot`, `ScatterPlot` and the end-of-line labels of `LinePlot` and `AreaPlot`, as its documentation says; only `ClevelandPlot` did. A format that returns no text for some rows - the only way to label some pieces of a stacked bar and not others - had no row to decide by.
|
|
10
|
+
|
|
5
11
|
## [1.8.0] - 2026-11-02
|
|
6
12
|
|
|
7
13
|
### Added
|
|
@@ -206,7 +206,7 @@ export class ValueLabels {
|
|
|
206
206
|
x: (processed.channels.x ?? position.x),
|
|
207
207
|
y: (processed.channels.y2 ?? processed.channels.y ?? topOf),
|
|
208
208
|
grouping: SERIES_ID_KEY,
|
|
209
|
-
text: (d) => format(Number(valueOf(d)), nameOf(d)),
|
|
209
|
+
text: (d) => format(Number(valueOf(d)), nameOf(d), d),
|
|
210
210
|
styles: {
|
|
211
211
|
...font,
|
|
212
212
|
...(this.fill ? { fill: this.fill } : {}),
|
|
@@ -21,7 +21,7 @@ export function buildValueLabels(labels, state, ctx) {
|
|
|
21
21
|
data: processedData.data,
|
|
22
22
|
x: position.x,
|
|
23
23
|
y: position.y,
|
|
24
|
-
text: (d) => format(Number(valueOf(d)), nameOf(d)),
|
|
24
|
+
text: (d) => format(Number(valueOf(d)), nameOf(d), d),
|
|
25
25
|
styles: {
|
|
26
26
|
...font,
|
|
27
27
|
fill: font?.fill ?? ctx.cfg.axis.color,
|
|
@@ -41,7 +41,7 @@ export function buildValueLabels(labels, state, ctx) {
|
|
|
41
41
|
[binned]: position[binned],
|
|
42
42
|
[value]: along,
|
|
43
43
|
transforms: [{ type: 'filter', filter: (d) => countOf(d) > 0 }],
|
|
44
|
-
text: (d) => format(countOf(d), nameOf(d)),
|
|
44
|
+
text: (d) => format(countOf(d), nameOf(d), d),
|
|
45
45
|
styles: {
|
|
46
46
|
...font,
|
|
47
47
|
fill: font?.fill ?? ctx.cfg.axis.color,
|
|
@@ -57,7 +57,7 @@ export function buildValueLabels(labels, state, ctx) {
|
|
|
57
57
|
data,
|
|
58
58
|
[valueAxis]: at,
|
|
59
59
|
[categoryAxis]: series[categoryAxis],
|
|
60
|
-
text: (d) => format(magnitude(d), series.name),
|
|
60
|
+
text: (d) => format(magnitude(d), series.name, d),
|
|
61
61
|
styles: {
|
|
62
62
|
...font,
|
|
63
63
|
fill: font?.fill ?? ctx.cfg.axis.color,
|
|
@@ -124,7 +124,7 @@ export function buildValueLabels(labels, state, ctx) {
|
|
|
124
124
|
? { x: position, y: geometry.categoryOf }
|
|
125
125
|
: { x: geometry.categoryOf, y: position }),
|
|
126
126
|
bandSlice: geometry.sliceOf(s.name),
|
|
127
|
-
text: (d) => format(Number(valueOf(d)), s.name),
|
|
127
|
+
text: (d) => format(Number(valueOf(d)), s.name, d),
|
|
128
128
|
styles: {
|
|
129
129
|
...font,
|
|
130
130
|
fill: font?.fill ?? ctx.cfg.axis.color,
|