0

Is there a a way to not show a series in the legend? As I can see there is

 seriesSettings:{
                line:{
                    addToLegend:true,
                    dataPointText:{
                        enabled:true,
                            borderRadius:4,
                            borderWidth:2,
                            borderColor:'red',
                    }
                }
}, 

But this shows/hides the whole series. For instance if I have a line and a bar data series- is it possible to hide only one of them?

Dan Wilson
  • 11
  • 5

1 Answers1

0

Yes, you can selectively show/hide series of the same type, bu adding the necessary value for the addToLegend property.

              {
                    seriesType: 'line',
                    addToLegend:true,
                    collectionAlias: 'Households',
                    data: [0.164, 0.173, 0.184, 0.125,0.258,0.255]
                },                    
                {
                    seriesType: 'line',
                    addToLegend:false,
                    collectionAlias: 'Industry',
                    data: [0.103,0.105,0.112]
                },     
            ]. 

Further you can even omit the initial declaration in the seriesSettings: {line:{, because by default the property is true. To easen even more your code, you could only set the property to false, where needed.

Ed Jankowski
  • 449
  • 1
  • 3
  • 5