Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
HTML validator does fail #5835
Highcharts should have no errors while HTML validation
There are three errors in line charts:
Live demo with steps to reproduce
Thanks for reporting!
For some reason, I don't see any errors related to the charts when validating that page in the nu validator. I see some other errors though. But I find it a little strange that you get this errors, because the SVG content is dynamically generated. If you view the source of the web page, you won't see any SVG code (like
It doesn't change anything, because the SVG is dynamically rendered by Highcharts, it is not part of the page source... You if you do View source, copy and paste the markup into the validator, you won't see any errors connected to the SVG. You probably pasted the generated source code?
This may work with the Highcharts client-side exporter, but this invalid SVG doesn't appear to work with Batik, which is required for full support of exporting in older browsers. I'm experimenting with Highstock 5.0.5 and Batik 1.8 running on JRE 8u112 on CentOS 7.
First, I still need to use the patch from #3095 to handle changing rgba to rgb.
Second, g tags cannot have height and width and it appears that not only do they appear in the Highcharts examples, but I'm seeing at least two or three instances of them in my experimentation.
Is there a way I can perhaps modify the patch identified in 3095 to fix this? Either way, if Batik is the standard server for handling exporting, the data produced by Highcharts should be consumed by it.
That shouldn't be the case... Our own server runs PhantomJS, and works with older browsers.
But it isn't. @gert our documentation gives the false impression that Batik is the preferred server: http://www.highcharts.com/docs/export-module/setting-up-the-server.
@ThomasOwens The node-export-server is still in Beta, but we're running it in production now. I recommend that you invest your time in this. We will update our docs as soon as we have verified its stability.
I meant that the client-side exporter doesn't fully support older browsers. The documentation gives the impression that the preferred export server is the PHP script + Batik. Apparently that is incorrect.
I'll have to evaluate options at this point.
Going back to the original issue identified here, I believe that fixing these SVG compliance issues will make PHP+Batik work. It appears that it's no longer a supported option, but I don't see a reason why it shouldn't work. From what I can tell, it looks like the export servers that are tested against aren't fully compliant to SVG.
If the output isn't compliant SVG, this should be clearly documented somewhere. It also means that Batik will probably not work, so that should be removed from the docs as well.
Ideally, I'd like to see this issue resolved. If the client-side Highcharts/Highstock produce fully valid SVGs, then any tool to convert SVGs should be able to consume them.