javascript - remove inline styles from svg in highcharts -


i have started looking @ highcharts project , far have managed charts need problem have excessive markup bloat created along charts. give example:

<text style="color: white; font-family: verdana, helvetica, sans-serif; font-size: 12px; position: absolute; fill: white;" x="1288" y="252" zindex="2"> <tspan style="font-weight: bold;" x="1288"> <text style="color: white; font-family: verdana, helvetica, sans-serif; font-size: 12px; position: absolute; fill: white;" x="1288" y="452" zindex="2"> <tspan style="font-weight: bold;" x="1288"> 

this represents 2 objects in chart , each time can see color, font, position , fill added inline styles...

having not had exposure svg, requirement? able add class text, 'hc-txt' can set color, font, position , fill in css file.

e.g.

<text class="hc-txt" x="1288" y="252"> <tspan x="1288"> <text class="hc-txt" x="1288" y="452"> <tspan x="1288"> 

having looked in src file, have been able shorten prefix highcharts- hc- helps tidy markup little changing way in these objects created, being on ambitious?

thanks in advance,

will.

adding class attribute element should work - please check:

http://www.w3.org/tr/svg/styling.html#stylingwithcss

and one:

http://www.w3.org/tr/svg/styling.html#classattribute


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -