Although there is no option in the legend, there is an option in the objects of the series: visibleInLegend , this can be set dynamically against a collection or other logical test, for example:
new {
category = "Some Category",
value = Model.SomeCollection.Count,
color = "#FF9900",
visibleInLegend = Model.SomeCollection.Count > 0
},
source
share