0
votes

I have a site where I provide data for my users visualized by some Shield UI JavaScript charts. What I need is to profile the charts so that the data being exported depends on certain conditions - for instance user privileges and so on. Since there are multiple series in most charts users may wish to make variable exports.

What I need is to prevent them from turning off at least one constant data series that must always be visible.

How that could be accomplished since I can’t disable the legend that users need to pick up, nor do I find a way to disable a particular item in the legend so that this data series is always visible.

1

1 Answers

1
votes

There isn’t a way to enable/disable an item in the chart legend. Instead you may exclude that data series from being in the legend and so the users won’t be able to show/hide it. Since by default all data series are being added to the legend, you need to place some extra code likewise:

{
   seriesType: 'bar',
            addToLegend:false,
    data: [1, 2, 3]
},