mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-14 12:56:37 +00:00
simplify
This commit is contained in:
parent
11f6438ace
commit
95408c1776
@ -379,6 +379,9 @@ export class HaChartBase extends LitElement {
|
|||||||
...axis.axisPointer,
|
...axis.axisPointer,
|
||||||
status: "show",
|
status: "show",
|
||||||
handle: {
|
handle: {
|
||||||
|
color: colorVariables["primary-color"],
|
||||||
|
margin: 0,
|
||||||
|
size: 20,
|
||||||
...axis.axisPointer?.handle,
|
...axis.axisPointer?.handle,
|
||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
@ -475,17 +478,6 @@ export class HaChartBase extends LitElement {
|
|||||||
if (xAxis) {
|
if (xAxis) {
|
||||||
xAxis = Array.isArray(xAxis) ? xAxis : [xAxis];
|
xAxis = Array.isArray(xAxis) ? xAxis : [xAxis];
|
||||||
xAxis = xAxis.map((axis: XAXisOption) => {
|
xAxis = xAxis.map((axis: XAXisOption) => {
|
||||||
if (this._isTouchDevice) {
|
|
||||||
axis.axisPointer = {
|
|
||||||
handle: {
|
|
||||||
color: colorVariables["primary-color"],
|
|
||||||
margin: 0,
|
|
||||||
size: 20,
|
|
||||||
...axis.axisPointer?.handle,
|
|
||||||
},
|
|
||||||
...axis.axisPointer,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
if (axis.type !== "time" || axis.show === false) {
|
if (axis.type !== "time" || axis.show === false) {
|
||||||
return axis;
|
return axis;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user