Here are some common mistakes you could have occasionally done:
- You forgot to call
updateData()of the chart or called it in the wrong place. The proper initialization sequence is:
- Create series.
- Set data source to ALL series.
- Add series to the chart.
- You return null of too few points from your implementation of
NChartSeriesDataSource. Some series like Surface or Line need more than one point to be displayed. Check your implementation of
NChartPoint points(NChartSeries series)method.
- You did not retain data source for series in the member variable. This is probably the most common but also most non-obvious pitfall. Chart stores data source in a weak reference. This means, if you don't retain it somewhere outside of the chart, it will be cleaned by GC.
beginTransaction()you forgot to call
endTransaction(). You have to call
beginTransaction()if you use another thread to update data, and you have to call
endTransaction()in the end of your updating method.
No comments yet.
Please log in to place a comment.