Using thes HTML key labelCss_0 option causes multiple style="..." attributes to be added

Share RGraph:  

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Claus on 26th July 2017
I've been trying in vain to get labelCss_0 to work on HTML keys.

After doing some debugging, I discovered that the code in RGraph.common.key.js generates an HTML element that looks like this:

<span " style="xxx" style="yyy">

The xxx comes from labelCss and the yyy comes from labelCss_0. The occurrence of two style attributes is problematic. In Chrome and Firefox at least, the second style attribute is ignored.

Furthermore, the lonely " after span is a bug, generated by this code in line 719 of RGraph.common.key.js:

... + '" style="' +...

(I'm looking at RGraph.common.key.js version: 2017-05-08.)

Kind regards,
Claus

P.S. RGraph is a wonderful piece of software!
Posted by Richard on 26th July 2017
Hi there,

OK try the updated RGraph.common.key.js file. There's a demo here that appears to be OK:


www.rgraph.net/canvas/docs/html-keys-in-charts.html



Here's a link to the updated file:



www.rgraph.net/libraries/RGraph.common.key.js


> P.S. RGraph is a wonderful piece of software!

Thanks you. Strangely more people just don't see that! (in particular Google)



Richard
Posted by It works! on 26th July 2017
Thank you, Richard. The updated version seems to work correctly.

Cheers,
Claus
Posted by One tiny issue on 27th July 2017
Hi again, Richard,

One tiny issue with the updated RGraph.common.key.js:

There's a $cl(str) statement near the bottom of the file. You probably want to remove that.

Cheers,
Claus
Posted by Richard on 27th July 2017
Hi there,

Great - thanks.

Richard

Add a reply




« Back to message list