Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Apache echarts with Blazor: how to set series disabled by default

$
0
0

I'm using Apache ECharts with Blazor, and I want to set a series disabled by default, so that the user has to clicked on the legend entry to show its data in the chart. I found out how to do that in the original library, but I didn't get it in blazor resp. c#. I don't know how to instantiate a valid select-object:

_echart.Options.Series =[        new LineSeries    {        Name = "Dauer RA",        Data = chartValues.Select(v => v.AvgDuration),        YAxisIndex = 1,        Select = new Select        {            Disabled = true,            Label = null,            ItemStyle = null,            LabelLine = null,            LineStyle = null,            AreaStyle = null,            EndLabel = null,            UpperLabel = null,            EdgeLabel = null        }    }];

does not have an (visible) effect. And

_echart.Options.Legend.Selected = new Selected() { "Dauer RA":false };

raises a syntax error.I don't know how to convert the javascript solution to C#/Blazor :-( .


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>