Page 1 of 1
Legend checkbox styling
Posted: Wed Feb 20, 2013 11:54 pm
by 16959570
Is there a way to style the checkboxes in the Legend?
If I have a black background, you can see the outline of the checkboxes, but not whether they are ticked.
- checkboxes.png (7.98 KiB) Viewed 9587 times
Thanks,
Dave
Re: Legend checkbox styling
Posted: Fri Feb 22, 2013 4:18 pm
by yeray
Hi Dave,
The issue is that we draw the checkboxes manually. And we actually draw 4 lines: top and left in Color.GRAY and right and bottom in Color.lightGray. But we don't draw any background so if what you have in the back is black, you won't see the state of the checkbox.
I've modified it so the Legend color will be used to draw a rectangle so you'll have a background. This way, you can still have a transparent legend or not, and you can now have transparent checkboxes (legend color = Color.transparent) or colored (legend.color = yourColor).
This will be available with the next maintenance release.
In the meanwhile you can try to use LegendResolver's getItemCoordinates to manually calculate each checkbox position (something relative to the coordinates argument provided) and draw the colored rectangle inside this method. I think this would do the trick.
Re: Legend checkbox styling
Posted: Fri Feb 22, 2013 7:58 pm
by 16959570
No worries.
I'll just try with various shades of grey to white in the legend to get the best look for now.
Any hints to the next release date?
Thanks
Dave
Re: Legend checkbox styling
Posted: Tue Feb 26, 2013 10:51 am
by yeray
Hi Dave,
DaveSav wrote:Any hints to the next release date?
We are working on it, but I'm afraid I can't tell you a date for it.