SharpPlot Reference > SharpPlot Methods > SetSeriesNames Method

SharpPlot.SetSeriesNames Method

Assign a non-default name or names to the upcoming data series.


sp.SetSeriesNames(new string[]{"Budget","Forecast"});



This call will add the series name to the id tag in any web-formatted output. This makes it easy to write JavaScript which changes the elements as you mouse-over them or click on them (for example emphasising the border on mouse-enter).

It is also very helpful if your application is tracking hotspots using the Active Charts components, as you can output meaningful hotspot information to the console. For example:

Chart=Bar1, Series=Hats, Item=2, Type=Bar, Locator=186.9 52 216 193.2 0

Here the chart was named “Bar1” and the two series were named “Hats,Coats”. You could use the feedback from this structure to implement drill-down to get the detail of the ‘Hats’ series, second item.

See also ...

Active charts in GUI Applications | SharpPlot Members | SharpPlot.SetChartName Method | HotspotInfo Struct

Send comments on this topic
© Dyalog Ltd 2021