开发者

Achartengine X labels with uneven interval of time

I am using TimeChartView of AChartEngine 0.7.0 to draw chart.

on x-axis there is dat开发者_开发百科e and for y-axis there is value for specific date. i am parsing these values from xml so someday I get value of complete last 5 day but someday only of 3 days so when i get value of 3 days, chart shows x-values shifted compared to y-values. also sometimes there is repetition of date due to fix number of x-labels which i have solved.

I think i have similar problem to this SO Quest and mostly to this as I want to set X-intervals by using dates.

Achartengine X labels with uneven interval of time

Here Originally from XML,I am having values of date 28.09,27.09,26.09 but it displays as above.


When the number of (x,y) values are changed suppose from 5 to 3 or vice versa you should first remove the values that repaint the chart

public XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
dataset.getSeriesAt(0).clear(); // use this to clear your data set
dataset.getSeriesAt(0).add(x, y) // use this to add the new x,y values
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜