We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
null
1 parent ac74712 commit 657f3a6Copy full SHA for 657f3a6
2 files changed
.changeset/evil-bags-dance.md
@@ -0,0 +1,5 @@
1
+---
2
+'layerchart': patch
3
4
+
5
+fix(autoScale): Ignore `null` domain values, fixing some brush examples
packages/layerchart/src/lib/utils/scales.svelte.ts
@@ -171,9 +171,9 @@ export function autoScale(
171
propAccessor?: Accessor<any>
172
): AnyScale {
173
let values = null;
174
- if (domain && domain.length > 0) {
175
- // Determine based on domain values
176
- values = domain;
+ if (domain && domain.length > 0 && domain.some((d) => d != null)) {
+ // Determine based on non-null domain values
+ values = domain.filter((d) => d != null);
177
} else if (data && data.length > 0 && propAccessor) {
178
// Determine based on data values
179
const value = accessor(propAccessor)(data[0]);
0 commit comments