@rokkit/chart 1.4.1 → 1.4.2
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/dist/PlotState.svelte.js +5 -0
- package/package.json +4 -3
package/dist/PlotState.svelte.js
CHANGED
|
@@ -387,7 +387,12 @@ export class PlotState {
|
|
|
387
387
|
const crossVal = this.axisOrigin[1]
|
|
388
388
|
if (crossVal !== undefined) return this.yScale(crossVal)
|
|
389
389
|
const domain = this.yScale.domain?.()
|
|
390
|
+
/* v8 ignore start -- unreachable: yScale is either null (caught by the guard
|
|
391
|
+
above) or a d3 scale from buildUnifiedYScale, whose every return path is a
|
|
392
|
+
scaleLinear or scaleBand — both always expose domain() returning an array.
|
|
393
|
+
`ignore next` does not fire on a single-line `if (...) return`. */
|
|
390
394
|
if (!domain) return this.#innerHeight
|
|
395
|
+
/* v8 ignore stop */
|
|
391
396
|
// Auto quadrant: place x-axis at y=0 when domain spans zero (no offset)
|
|
392
397
|
if (domain[0] <= 0 && domain[domain.length - 1] >= 0) return this.yScale(0)
|
|
393
398
|
// Q1-only: axis at bottom edge, optionally with offset
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rokkit/chart",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Data-driven chart components",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"postpublish": "node ../../config/pack-repoint.mjs --restore && rm -f LICENSE",
|
|
21
21
|
"clean": "rm -rf dist",
|
|
22
22
|
"build": "svelte-package -i src -o dist",
|
|
23
|
-
"check": "svelte-check --tsconfig ./tsconfig.json"
|
|
23
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
24
|
+
"check:types": "tsc --noEmit"
|
|
24
25
|
},
|
|
25
26
|
"files": [
|
|
26
27
|
"dist",
|
|
@@ -72,6 +73,6 @@
|
|
|
72
73
|
"@types/d3-transition": "^3.0.9",
|
|
73
74
|
"@types/d3-zoom": "^3.0.8",
|
|
74
75
|
"@types/ramda": "^0.31.1",
|
|
75
|
-
"svelte-check": "^4.
|
|
76
|
+
"svelte-check": "^4.7.6"
|
|
76
77
|
}
|
|
77
78
|
}
|