Scalable Vector Graphics (SVG) is a graphics format based on Extensible Markup Language (XML) for describing two-dimensional vector graphics. SVG is developed by W3C and is an open standard. In addition, SVG is also the abbreviation of Static Var Generator
The code to determine whether the browser supports SVG (part of it is cut from the Highcharts source code):
Js code:
function hasSVG(){
SVG_NS = 'http://www.w3.org /2000/svg',
return !!doc.createElementNS &&
!!doc.createElementNS(SVG_NS, 'svg').createSVGRect;
}
Not supported by IE8 SVG, so when setting the legend horizontal position for the Highcharts chart and setting the same x value, the display effects of Chrome and IE are inconsistent. Therefore, it is necessary to determine whether the browser supports SVG and set different x values according to different results.