You can post your files at our upload page.gusg wrote:I can not post a complete app on a public forum, trade secrets and all that stuff. If you have a private way, that may be acceptable.
Right, if you can generate some random data locally and reproduce the same problem with it, it would be very helpful.gusg wrote: Second, the data that adds the bar(s) is generated by hardware on the other processor in this design and sent to the Android display over a serial port. Without that other half to generate the data, it would be difficult to see it happen. Perhaps I could alter it to generate data locally by some other means, make me some suggestions here. Note that this app will only ever run on the one piece of hardware we are using. See info in the first post in this thread. Note that the demo seems to perform about the same way as our app does on this hardware.
Try with a for loop generating Random values.
The problem will be to generate an event to substitute your capturing system. You could try with a Timer or just some user interaction like a Button.
If the problem is that the application is too slow when you repaint the chart, it would indicate the problem resides in the number of points to draw (more points to draw means more time needed). So I'd suggest you to reduce the number of points by:gusg wrote:More info. On further testing, I notice that series.add(v1, v2, Color.blue); executes very quickly. I have set chart.setAutoRepaint (false); before doing this and executed setMinMax before setting AutoRepaint to true again and then doing a chart.invalidate(); to get it to repaint. The big delay happens after this point. It appears to bog down the whole app to the point that nothing else seems to be keeping up while this is going on. I also notice that even after my app has painted the chart and is idle, scrolling by touch has similar delays. Drag the chart left or right with a finger and there is a long noticeable delay after dragging before it actually moves.
- Set FastLine's series DrawAllPoints property to false. This makes the series to only draw one point for all the points that coincide in a same X pixel, reducing the drawing time.
- DownSampling function to reduce the number of points to show.