Is there anyway I can pass width height as percentage when creating SVGGraphics2D? I couldn't find percentage in SVGUnits neither.
Or is there anyway to change width & height later after elements are placed? I'm getting the elements from the database and it would be great if I could define width & height after finding out left most & right most coordinates of my elements.
Create svg with 100% width height
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
Re: Create svg with 100% width height
Do you just want to scale your image in a web page? Maybe the following post is helpful:
https://css-tricks.com/scale-svg/
I have to admit I didn't realise that % is a valid unit in the SVG width and height attributes so I need to spend a little more time looking at this. For sure you can't specify percentage using the current version of SVG, but maybe the viewBox attribute will do what you need.
https://css-tricks.com/scale-svg/
I have to admit I didn't realise that % is a valid unit in the SVG width and height attributes so I need to spend a little more time looking at this. For sure you can't specify percentage using the current version of SVG, but maybe the viewBox attribute will do what you need.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program