happysir / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

randomly not plotting line chart #425

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I tried various patterns, but still couldn't find a definite pattern that 
outputs this issue.  Till now it seem totally random.

What is the expected output? What do you see instead?
The expected output is a line chart which happens a lot.  But sometimes a blank 
chart appears with the y and x-axis visible (as can be seen from the image).

Snippet:
String seriesTitle = "Alpha";
String seriesTitleB = "Beta";
String seriesTitleD = "Delta";
// create a new series of data
XYSeries series = new XYSeries(seriesTitle);
XYSeries seriesB = new XYSeries(seriesTitleB);
XYSeries seriesD = new XYSeries(seriesTitleD);
float x =1;
int c =0;
do{
   String s= alpha.getItems().get(c).toString();
   series.add((double)x, Double.parseDouble(s.substring(1, s.length()-1)));
   s= beta.getItems().get(c).toString();
   seriesB.add((double)x, Double.parseDouble(s.substring(1, s.length()-1)));
   s= delta.getItems().get(c).toString();
   seriesD.add((double)x, Double.parseDouble(s.substring(1, s.length()-1)));
   x++;
   c++;
}while(alpha.size() > c);

mDataset.addSeries(series);
mDataset.addSeries(seriesB);
mDataset.addSeries(seriesD);

// create a new renderer for the new series
XYSeriesRenderer renderer = new XYSeriesRenderer();
renderer.setColor(Color.argb(255, 238 , 89, 125));

// create a new renderer for the new series
XYSeriesRenderer rendererB = new XYSeriesRenderer();
rendererB.setColor(Color.argb(255, 29, 158, 225));

XYSeriesRenderer rendererD = new XYSeriesRenderer();
rendererD.setColor(Color.argb(255, 15, 122, 131));

mRenderer.addSeriesRenderer(renderer);
mRenderer.addSeriesRenderer(rendererB);
mRenderer.addSeriesRenderer(rendererD);

mChartView.repaint();

What version of the product binary library are you using?
achartengine-1.1.0.jar

Original issue reported on code.google.com by jonathan...@gmail.com on 6 Aug 2014 at 9:31

Attachments:

GoogleCodeExporter commented 9 years ago
I used the getTimeChartView() to get a view with 2 lines in it, and repeat this 
each second. someTimes one of the lines disappeared, this may happen onece in a 
minute. 

maybe the same problem?  

1.1.0 version, too.

Original comment by 304456...@qq.com on 28 Dec 2014 at 8:37