Page 1 of 1
SVG-Export multiple horizBars-Series side by side
Posted: Sat Jun 27, 2015 4:13 pm
by 17470584
Exporting multiple horizBars-Series, which are displayed on screen side by side, to the SVG-format makes the horizBars-Series overlapping.
The export to the other pixel-export-formats (bmp, png, ...) supplies an correct result. The bars were displayed side by side like the are displayed on the screen.
Please take a look a the attachements:
- AgePyramide.png - bars were displayed side by side -> correct (it is like the screen and all the other pixel-formats)
- AgePyramide.svg - bars overlap
regards Oliver
Re: SVG-Export multiple horizBars-Series side by side
Posted: Mon Jun 29, 2015 9:32 am
by yeray
Hello,
Could you please arrange a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
Re: SVG-Export multiple horizBars-Series side by side
Posted: Tue Jul 07, 2015 7:22 pm
by 17470584
Hello,
in the zip-file you can find a simple Netbeans-Projekt which demonstrates the problem.
As a result of the file size limitation I removed the "TeeChart.Swing.jar" from the directory "Gizeh02\dist\lib".
Regards Oliver
Re: SVG-Export multiple horizBars-Series side by side
Posted: Wed Jul 08, 2015 2:15 pm
by yeray
Hello Oliver,
I see the rectangles seem to be too high. Drawing the rectangles one pixel smaller in height seems to fix it.
However, it doesn't look well yet because the antialias is drawing the lines using a stroke two pixels wide. This can be corrected making the rectangles 0.5 pixels smaller in width and starting drawing them 0.5 pixels below in y.
Here it is a SVGRect function you can try in your sources to see if it fits your needs (find this function at Graphics3DSVG.java, in the drawing folder of the sources):
Code: Select all
private String SVGRect(Rectangle r) {
int w = r.width;
int h = r.height;
m_String = "x=\"" + Double.toString(r.getLeft()) + "\" y=\"" +
Double.toString(r.getTop()+0.5) +
"\" ";
m_String += " width=\"" + Double.toString(w-0.5) + "\"" + " height=\"" +
Integer.toString(h-1) + "\"";
return m_String;
}
We still have to investigate if these changes have any drawback before validating them.