Sign in to follow this  
domurtag

include comma in tooltip

Recommended Posts

Hi,

 

I use the feedData() function to add data to a RealTimeLine JavaScript chart, e.g.

var fusionFormat = "&label=" + data.label + "&value=" + data.value + "&toolText=before,after";
this.chart.feedData(fusionFormat);

However, if the tooltip text contains a comma, only the text before the comma is displayed, so in the example about the tooltip displays only "before". Is it possible to include commas in tooltips that are added via feedData() function?

 

Thanks in advance.

Edited by domurtag

Share this post


Link to post
Share on other sites

I managed to resolve this by URL-encoding the tooltip, i.e.

var fusionFormat = "&label=" + data.label + "&value=" + data.value + "&toolText=" + encodeURIComponent(data.toolText);
this.chart.feedData(fusionFormat);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this