Open isak1080 opened 11 months ago
Hi @isak1080,
Indeed this won't work at the moment. You can try setting the MarkerType to None instead:
<RadzenMarkers MarkerType="@(showMarkers2019 ? MarkerType.Square : MarkerType.None)" />
Thanks. This does indeed work around the problem for now.
The only problem is that it will bloat the output by producing tons of empty <g class="rz-marker">
tags in the SVG. Once for every data point (I have hundreds of them in each line)
Describe the bug I have a radzen line chart with multiple line series. Some of these have markers and some don't. I also have buttons in the UI that show/hide these lines at the user's will.
As long as I don't use markers I don't have a problem, but as soon as one of the series have markers the rendering of the charts gets "weird". I'm not 100% sure what happens, but it seems that it applies markers to all line series (even though they don't have them - I've debugged and verified I don't output marker in the razor).
To Reproduce I was able to modify the sample over at https://blazor.radzen.com/line-chart to show what I think is the same issue. Here is the full sample, just paste it to the demo page: radzen-markers-bug.razor.txt
It adds a checkbox:
and uses the boolean to show/hide the markers:
If the value of
showMarkers2019
is false at start, checking the checkbox will trigger a refresh and markers will appear. They won't go away by unchecking. If the value startstrue
, the markers appear but cannot be turned off.Expected behavior Markers appear and disappear with the toggle of the checkbox
Screenshots
Desktop (please complete the following information):