Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/core/chart-api/chart-extra-pointer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,9 @@ export class ChartExtraPointer {

private applyCursorStyle = () => {
const container = this.context.chart().container;
const setCursor = (value: "pointer" | "default") => {
if (container && container.style.cursor !== value) {
container.style.cursor = value;
}
};
if (this.hoveredPoint || this.hoveredGroup) {
setCursor("pointer");
} else {
setCursor("default");
if (container) {
const value = this.hoveredPoint || this.hoveredGroup ? "pointer" : "default";
container.style.cursor = value;
}
};
}
2 changes: 1 addition & 1 deletion src/core/chart-api/chart-extra-tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export class ChartExtraTooltip extends AsyncStore<ReactiveTooltipState> {
};

private get commonTrackAttrs() {
return { fill: "transparent", zIndex: -1, style: "pointer-events:none", direction: this.direction };
return { fill: "transparent", zIndex: -1, "pointer-events": "none", direction: this.direction };
}

// We compute the direction from the chart container and then explicitly set it to the track
Expand Down
2 changes: 1 addition & 1 deletion src/internal/chart-styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const navigationFocusOutline = {
export const cursorLine = {
fill: colorChartsLineTick,
zIndex: 5,
style: "pointer-events: none",
"pointer-events": "none",
};

export const focusOutlineOffsets = {
Expand Down
4 changes: 2 additions & 2 deletions src/internal/components/series-marker/render-marker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function getDefaultPointProps(point: Highcharts.Point, selected: boolean, classN
const pointStyle: Highcharts.SVGAttributes = {
zIndex: selected ? 6 : 5,
opacity: 1,
style: "pointer-events: none",
"pointer-events": "none",
class: className,
"stroke-width": 2,
stroke: selected ? colorTextBodyDefault : point.color,
Expand All @@ -92,7 +92,7 @@ function getDefaultPointProps(point: Highcharts.Point, selected: boolean, classN
stroke: point.color,
fill: "transparent",
opacity: 0.4,
style: "pointer-events: none",
"pointer-events": "none",
r: 8,
};
return { size, pointStyle, haloStyle };
Expand Down
Loading