text-decoration:line-through; in SVG rendered by Highcharts


I'm trying to add 2 styles to a string in javascript, which is then rendered as svg.

The first style is text color:#value; and works fine as svg reproduces this as a fill:#value;

The second style is text-decoration:line-through; which doesn't work because the text is not seen as text, being an svg render.

My question: How do I request my line-through style into the auto-generated highcharts svg?


Is this what you had in mind?

Here's a fork from the original, only the fork has a textDecoration property set for it.

original: http://jsfiddle.net/Tr7nk/11/

fork with line-through: http://jsfiddle.net/GreyPilgrim/pFXTd/

The original is from the Highcharts API example for styling tooltips: http://www.highcharts.com/ref/#tooltip--style

And here's an excerpt of the fork declaring the line-through:

tooltip: {
    style: {
        padding: 10,
        textDecoration: 'line-through',
        fontWeight: 'bold'

Hope this helps.

By : mg1075

This video can help you solving your question :)
By: admin