2

I am using javascriptRRD library to read rrd files and plots graph via float charts. When chart is plotted I only see the legend having color info of value to be plotted . I additional require minimum , maximum, and current values of the data plotted.. is it possible to customize the legend fields ?

Thanks

Bhupendra
  • 1,196
  • 16
  • 39

1 Answers1

2

You can customize the data series labels in the legend with a labelFormatter function like this:

labelFormatter: function(label, series) {
    // series is the series object for the label
    return '<a href="#' + label + '">' + label + '</a>';
}

See the documentation for more details.

Raidri
  • 17,258
  • 9
  • 62
  • 65
  • 2
    Beat me to the answer. @Bhupendra, here's an example I coded up: http://plnkr.co/edit/6uHsRVuJTSbtTjpODKb0?p=preview – Mark Oct 30 '14 at 17:17
  • @Mark thanks for demo .In demo legends are stacked one below other in different rows , but in my case it all comes side by side in a single row , is there any flag to change for stacking legends vertically – Bhupendra Oct 31 '14 at 09:41
  • 2
    @Bhupendra Use `noColumns: 1` (or what you want) in the legend options. – Raidri Oct 31 '14 at 09:49