mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-13 12:26:35 +00:00
Ignore hidden xAxis
This commit is contained in:
parent
a18b9bc342
commit
11f6438ace
@ -371,17 +371,20 @@ export class HaChartBase extends LitElement {
|
|||||||
lastTipY = e.y;
|
lastTipY = e.y;
|
||||||
this.chart?.setOption({
|
this.chart?.setOption({
|
||||||
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
|
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
|
||||||
(axis: XAXisOption) => ({
|
(axis: XAXisOption) =>
|
||||||
...axis,
|
axis.show
|
||||||
axisPointer: {
|
? {
|
||||||
...axis.axisPointer,
|
...axis,
|
||||||
status: "show",
|
axisPointer: {
|
||||||
handle: {
|
...axis.axisPointer,
|
||||||
...axis.axisPointer?.handle,
|
status: "show",
|
||||||
show: true,
|
handle: {
|
||||||
},
|
...axis.axisPointer?.handle,
|
||||||
},
|
show: true,
|
||||||
})
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: axis
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -395,17 +398,20 @@ export class HaChartBase extends LitElement {
|
|||||||
}
|
}
|
||||||
this.chart?.setOption({
|
this.chart?.setOption({
|
||||||
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
|
xAxis: ensureArray(this.chart?.getOption().xAxis as any).map(
|
||||||
(axis: XAXisOption) => ({
|
(axis: XAXisOption) =>
|
||||||
...axis,
|
axis.show
|
||||||
axisPointer: {
|
? {
|
||||||
...axis.axisPointer,
|
...axis,
|
||||||
handle: {
|
axisPointer: {
|
||||||
...axis.axisPointer?.handle,
|
...axis.axisPointer,
|
||||||
show: false,
|
handle: {
|
||||||
},
|
...axis.axisPointer?.handle,
|
||||||
status: "hide",
|
show: false,
|
||||||
},
|
},
|
||||||
})
|
status: "hide",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: axis
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
this.chart?.dispatchAction({
|
this.chart?.dispatchAction({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user