Bhupendra
Bhupendra

Reputation: 1286

show additional information in legend in flot chart

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

Upvotes: 2

Views: 287

Answers (1)

Raidri
Raidri

Reputation: 17550

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.

Upvotes: 2

Related Questions