Reputation: 111
I know that we can alter the graph selecting the series as below
$(document).ready(function () {
var lineSeries = Highcharts.seriesTypes.line;
var lineDrawGraph = lineSeries.prototype.drawGraph;
lineSeries.prototype.drawGraph = function () {
Is there any way to select the lineSeries based on anything other than seriesType.line? for eg using chart name..
I need this function to be executed only for a line chart and not on all the line charts in my page. Unfortunately "lineSeries.prototype.drawGraph" gets called for all the line charts.
Upvotes: 0
Views: 85
Reputation: 3384
You can get the type of your specific series like this:
Highcharts.charts[i].series[j].type
You can check the type of your series on a specific chart (i
), and use foreach on Highcharts.charts[i].series
and check if the type is line
then add your drawGraph
function.
Upvotes: 1