Dynamically adding scale markers?

I was wondering if there is a way to dynamically add scale-x markers AFTER the graph has been rendered, perhaps using a function like this:

zingchart.exec('myChart', 'addscalexmarker', { type: "line", range: 14, label: { text: "label!! yay!" } } 

I can't seem to figure out how to make this work ... Thanks in advance!

+5
source share
1 answer

While ZingChart has a wide range of API methods that allow users to modify different parts of the diagram, not every attribute is accessible through a named method.

My suggestion would be to use the setdata strong> method , which is the catch-all API method to modify the JSON diagram. Chart state management will be external to ZingChart, but updates will be handled by a single call to the setdata strong> method .

  zingchart.exec('myChart', 'setdata',{ data : myConfig }); 

Working demo: http://demos.zingchart.com/view/BG8SXI4W

I'm on the ZingChart team - let me know if you have any further questions.

+7
source

All Articles