Ignore hidden xAxis

This commit is contained in:
Petar Petrov 2025-07-06 11:36:50 +03:00
parent a18b9bc342
commit 11f6438ace

View File

@ -371,17 +371,20 @@ export class HaChartBase extends LitElement {
lastTipY = e.y;
this.chart?.setOption({
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
(axis: XAXisOption) => ({
...axis,
axisPointer: {
...axis.axisPointer,
status: "show",
handle: {
...axis.axisPointer?.handle,
show: true,
},
},
})
(axis: XAXisOption) =>
axis.show
? {
...axis,
axisPointer: {
...axis.axisPointer,
status: "show",
handle: {
...axis.axisPointer?.handle,
show: true,
},
},
}
: axis
),
});
});
@ -395,17 +398,20 @@ export class HaChartBase extends LitElement {
}
this.chart?.setOption({
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
(axis: XAXisOption) => ({
...axis,
axisPointer: {
...axis.axisPointer,
handle: {
...axis.axisPointer?.handle,
show: false,
},
status: "hide",
},
})
(axis: XAXisOption) =>
axis.show
? {
...axis,
axisPointer: {
...axis.axisPointer,
handle: {
...axis.axisPointer?.handle,
show: false,
},
status: "hide",
},
}
: axis
),
});
this.chart?.dispatchAction({