Search found 44 matches

by znakeeye
Tue Mar 19, 2013 8:17 pm
Forum: Java
Topic: Right-aligned legend has no margin
Replies: 6
Views: 13480

Re: Right-aligned legend has no margin

setMarginRight did the trick! Thanks!
by znakeeye
Tue Mar 19, 2013 8:13 pm
Forum: Java
Topic: Your pixel handling seems wrong
Replies: 3
Views: 8734

Re: Your pixel handling seems wrong

That's the code I was looking for. Thanks!
by znakeeye
Tue Mar 19, 2013 8:10 pm
Forum: Java
Topic: Empty TChart initialization takes 3 seconds
Replies: 3
Views: 9472

Re: Empty TChart initialization takes 3 seconds

I removed the localization entirely (assuming "design time") since I do not use any of the localized strings. I did have to set the format for my axis labels explicitly, but I can live with that :) Regarding localization, why not use the resource system that comes with Android? Just put xml resource...
by znakeeye
Tue Mar 19, 2013 8:03 pm
Forum: Java
Topic: Different gradients for different bars?
Replies: 6
Views: 14703

Re: Different gradients for different bars?

In that post I asked for the opposite; the same gradient for all bars.

Now I'm asking for different gradients for different bars (obviously in the same Bar class instance). Please see attached image.
by znakeeye
Mon Mar 18, 2013 11:45 pm
Forum: Java
Topic: Empty TChart initialization takes 3 seconds
Replies: 3
Views: 9472

Empty TChart initialization takes 3 seconds

This line takes 3 seconds on my Nexus 4 (using English/UK locale): chart = new TChart(this); The culprit is this line: bundle = ResourceBundle.getBundle(languages, currentLocale); Not sure why this activate() function is even called. It seems it only looks for the line/column separators. Really odd!...
by znakeeye
Mon Mar 18, 2013 9:55 pm
Forum: Java
Topic: Different gradients for different bars?
Replies: 6
Views: 14703

Different gradients for different bars?

You can easily get a specific gradient for all bars in a Bar chart. However, what if you want different gradients for each bar in the Bar chart? Bar bar = new Bar(chart.getChart()); bar.getColors().setColor(0, red); bar.getColors().setColor(1, blue); bar.add(0, 123, "Red"); bar.add(0, 123, "Blue"); ...
by znakeeye
Sun Mar 17, 2013 11:22 pm
Forum: Java
Topic: Your pixel handling seems wrong
Replies: 3
Views: 8734

Your pixel handling seems wrong

I've noticed that if I set a font size of 18, it looks ok on my Nexus 4, but on my Galaxy Mini (with horrible resolution) the font is LARGE. I believe your APIs expect "pixel count", which doesn't reflect what you see on a real device. Instead, DPs (device independent pixels) should be used. Is it u...
by znakeeye
Sat Mar 16, 2013 11:14 pm
Forum: Java
Topic: Canvas restore underflow after image export
Replies: 3
Views: 9389

Re: Canvas restore underflow after image export

Ok, found a fix. Please verify that this is the right way to solve this! public Image image(int width, int height) { final Object old = androidGraphics.getGraphics(); Image i = new Image(width, height); Canvas c = new Canvas(i.bitmap); // FIX: Explicitly call save() to allow for canvas.restore() lat...
by znakeeye
Sat Mar 16, 2013 10:58 pm
Forum: Java
Topic: Canvas restore underflow after image export
Replies: 3
Views: 9389

Re: Canvas restore underflow after image export

Please post a source code fix here as soon as possible. This is a blocker for my app :(
I'll see if I can fix it until then! Thanks.
by znakeeye
Sat Mar 16, 2013 10:27 pm
Forum: Java
Topic: Canvas restore underflow after image export
Replies: 3
Views: 9389

Canvas restore underflow after image export

I do this to export an image from my area chart (painted with SeriesBand): chart.doInvalidate(); Image img = chart.getExport().getImage().image(WIDTH, HEIGHT); chart.doInvalidate(); That works the first time. The second time it crashes on the call to restore() in Graphics3DAndroid.java. public void ...
by znakeeye
Fri Mar 15, 2013 6:20 pm
Forum: Java
Topic: Proper gradient for bars/area
Replies: 5
Views: 13837

Re: Proper gradient for bars/area

Hi again. I couldn't wait, so I implemented n-color gradient. Yeray, please e-mail me (the e-mail is linked to my account) if you want my source code changes.
by znakeeye
Fri Mar 15, 2013 5:45 pm
Forum: Java
Topic: Proper gradient for bars/area
Replies: 5
Views: 13837

Re: Proper gradient for bars/area

I believe there is a simple solution to get this right. This works: if (dir == GradientDirection.VERTICAL) { g = new LinearGradient(0, /*rectangle.y*/0, 0, rectangle.getBottom(), colors, null, Shader.TileMode.CLAMP); } If you ask me, the above is the correct way to apply a gradient on any chart. Per...
by znakeeye
Fri Mar 15, 2013 5:27 pm
Forum: Java
Topic: CircularGauge crash fix
Replies: 1
Views: 6257

CircularGauge crash fix

Recall this issue: http://stackoverflow.com/questions/14005930/how-do-i-hide-the-hand-cursor I believe you already fixed this, but I'll post this anyway :) I moved the try/finally block inside the visibility check in drawHand() function, CircularGauge.java(1010). That makes sure the call to resetTra...
by znakeeye
Fri Mar 15, 2013 5:07 pm
Forum: Java
Topic: Proper gradient for bars/area
Replies: 5
Views: 13837

Re: Proper gradient for bars/area

Hi. Thanks for the clarification! Setting each color from a specific gradient array is desirable but not a requirement. Using three colors is good enough for my needs. But even if I use SeriesBand the result is not 100% correct. Recall your sample here: http://stackoverflow.com/questions/14014925/ho...
by znakeeye
Fri Mar 15, 2013 4:56 pm
Forum: Java
Topic: Right-aligned legend has no margin
Replies: 6
Views: 13480

Re: Right-aligned legend has no margin

That looks like 100 pixels on the left. What about the right side? In my app it touches the border of the entire TChart view.