-1

When using Highcharts.setOptions() it's for all charts following after this function.

But I haven't found a way to do something like:

$(".barcharts_overview").Highcharts.setOptions() or $(".asplinecharts_detailed").Highcharts.setOptions() or like $(".asplinecharts_detailed").setOptions()

Is there a way to do something like this? My goal is, to define 2-3 option sets which should be used, when the div container has a class like "barcharts_overview" or "asplinecharts_detailed" to just define the settings once, while displaying multiple charts in different styles on one page.

djot
  • 2,952
  • 4
  • 19
  • 28
  • 1
    The following question should help you: http://stackoverflow.com/questions/8253590/manage-multiple-highchart-charts-in-a-single-webpage/9607502#9607502 – Ricardo Alvaro Lohmann Oct 29 '13 at 18:23
  • 1
    This also seems to be what you are asking: http://stackoverflow.com/questions/13049977/how-can-i-get-access-to-a-highcharts-chart-through-a-dom-container – Mark Oct 29 '13 at 19:23
  • @djot thanks for editing, sorry forgot the code tags. – Michael Scholz Oct 29 '13 at 21:38
  • @RicardoLohmann Seems i need a combination of both links. Thanks in advance, i'll reply/comment again, when finished testing. And thanks to StackOverflow that i just can enter one user notification... :/ – Michael Scholz Oct 29 '13 at 21:42

1 Answers1

0

Generally, when you use setOptions, then options are added globally, but you can prepare switch/if which recognises which class exists (if one on page) and calls setOptions.

djot
  • 2,952
  • 4
  • 19
  • 28
Sebastian Bochan
  • 37,348
  • 3
  • 49
  • 75