Home Forums Report Bugs Zooming on graph changes it to another graph. Reply To: Zooming on graph changes it to another graph.

#17275

@cgar,

In JavaScript, Objects are passed as References. So, changes made to a title.text will be reflected across all charts as same object is passed as chart-options for all. Using separate options for every chart would work fine in your case.

Please take a look at the following StackOverflow links-
Javascript by reference vs. by value
Is JavaScript a pass-by-reference or pass-by-value?

Also, please take a look at this updated jsfiddle.

___________
Indranil Deo,
Team CanvasJS

  • This reply was modified 6 years, 5 months ago by Indranil.