How to hide LineChart Series Markers when Legend Item is hovered?

0 Answers 60 Views
Charts
Kenny
Top achievements
Rank 1
Kenny asked on 21 Nov 2024, 10:29 PM

When hovering over the legend of a series in a Line Chart, the chart is rendering a marker for every data point in the series. I was wondering how I can disable this functionally so that only the series line gets highlighted when a legend item is hovered.

In the series object I am setting the markers visible value to false and setting the highlight's opacity.

highlight: {
    inactiveOpacity: .3,
    opacity: 1
},
markers: { visible: false },

When no series is highlighted, no markers appear: I wish to keep this.


When a series is highlighted, only the marker at the data point appears: I wish to keep this.


When a series legend is hovered, a marker for every data point appears. How can I get it to look like the second image to where no markers are shown and only the legend item's associated series is highlighted?

Nikolay
Telerik team
commented on 26 Nov 2024, 04:20 PM

Hi Kenny,

I am afraid this is not possible with the current API of the Chart. I suggest submitting a feature request in our Feedback portal.

You can disable the legend highlight visibility to disable the markers on legend hover.

           seriesDefaults: {
              type: "line",
              markers: { visible: false },
              highlight: { visible: false }
            },

Dojo demo: https://dojo.telerik.com/xyVXCvwr

Regards,

Nikolay

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Kenny
Top achievements
Rank 1
Share this question
or