As mentioned early some charts are quite slow to render. Some of this can be solved by rendering to an image an then just have CN1 draw this.
Currently I use this code to achieve it:
private static Image g(GraphicalView g, int w, int h) {
Image buf = Image.createImage(w, h, 0xF0F0F0);
buf.getGraphics().setClip(0, 0, w, h);
Canvas canvas = new Canvas();
Paint paint = new Paint();
canvas.g = buf.getGraphics();
Paint.g = buf.getGraphics();
g.getChart().draw(canvas, 0, 0, w, h, paint);
return buf;
}
There should however be a way to invalidate the cache or it should detect automatically.
As mentioned early some charts are quite slow to render. Some of this can be solved by rendering to an image an then just have CN1 draw this.
Currently I use this code to achieve it:
There should however be a way to invalidate the cache or it should detect automatically.