Posted by peltrie
on June 2, 2008 at 2:38 AM PDT
I have "wired" a datatable to a line chart such that an event will retrieve data (formatted as a JSONArray) and populate a table via addRows, and a chart via addDataset.
The problem arises upon display and it depends on the data whether a chart is displayed correctly or not. For example, passing datasets [1, 2, 3], [4, 5, 6], [7, 8, 9] through addDataset, it seems that only dataset [7, 8, 9] is displayed. On the other hand, datasets [7, 8, 9], [4, 5, 6], [1, 2, 3] displays three charts as expected.
(Note, do not take the dataset values literally, they are just examples.)
Whilst debugging, I found that each dataset was displayed correctly, but each call to addDataset would clear the chart screen, so the previously drawn dataset is cleared.
Can someone point me to any example that uses a chart's addDataset function (correctly)?