jpierce42

parseToolText is not defined after upgrade to FusionCharts XT

Recommended Posts

I recently upgraded from FusionCharts 3.2.1 to XT.  I followed the instructions here, including the instructions relate to FusionWidgets:

 


 

and am using the following line to render JS charts by default:

 

FusionCharts.setCurrentRenderer('javascript');

 

Previously, our system was set up to render Flash charts from XML data, and I haven't changed any of the existing code.

 

I'm now seeing the following error in the console, on a page that renders a number of angular gauges:

 

Uncaught ReferenceError: parseTooltext is not defined FusionCharts.HC.Widgets.js:193

p.series FusionCharts.HC.Widgets.js:193

p.chart FusionCharts.HC.Widgets.js:120

R.init FusionCharts.HC.js:521

p.init FusionCharts.HC.Widgets.js:105

g.createChart FusionCharts.HC.js:460

j.extend.render FusionCharts.HC.js:782

a.renderer.render FusionCharts.js:56

a.extend.render FusionCharts.js:64

dash.renderXML dashboard.js:40

(anonymous function) dashboard.js:227

c jquery-1.10.2.js:3048

p.fireWith jquery-1.10.2.js:3160

k jquery-1.10.2.js:8235

r jquery-1.10.2.js:8778

 

dash.renderXML (dashboard.js, line 40) calls chart.setDataXml() with the following xml:

 

<?xml version="1.0" encoding="utf-8"?>

<chart showLimits="0" showAboutMenuItem="0" chartRightMargin="8" lowerLimit="-100" clickURL="JavaScript:dash.change_metric(0);" gaugeEndAngle="0" tickValueStep="1" bgColor="ffffff" tickValueDistance="14" autoScale="0" palette="1" gaugeStartAngle="180" showTickValues="1" chartTopMargin="5" exportEnabled="1" chartLeftMargin="8" chartBottomMargin="5" showBorder="0" imageSaveURL="/data/image" exportFormats="PNG=Save as Image" decimals="1" showTickMarks="1" upperLimit="100">

<colorRange>

    <color code="FFFFFF" maxValue="-15.6" minValue="-100.0"/>

    <color code="FF0000" maxValue="1.7" minValue="-15.6"/>

    <color code="f2f20c" maxValue="14.5" minValue="1.7"/>

    <color code="0cf20c" maxValue="62.2" minValue="14.5"/>

    <color code="FFFFFF" maxValue="100.0" minValue="62.2"/>

</colorRange>

<dials>

    <dial rearExtension="5" toolText="Amazon.com: 62.2" id="brand1" value="62.2"/>

</dials>

<trendpoints>

    <point color="666666" alpha="100" thickness="2" startValue="7.21319806914" displayValue=" "/>

</trendpoints>

<styles>

    <definition>

        <style bgColor="ffffff" type="font" name="defaultfont"/>

    </definition>

    <application>

        <apply toObject="value" styles="defaultfont"/>

        <apply toObject="limitvalues" styles="defaultfont"/>

    </application>

</styles>

</chart>

 

dashboard.js, line 227 is the line that calls this function.

 

The gauges are not being rendered; they just show up as blank boxes.  

 

Any idea where this error might be coming from or how to fix it?  Thanks!

 

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

This error comes due to toolText="Amazon.com: 62.2" in the <dial /> tag of your XML data. So by removing this toolText will render the Gauge as expected

 

However, regarding the issue of "toolText" attribute, we are looking into it and will get back to you once we get the updates.

 

Also, it seems you are using "setDataXml()" method in your code which is the deprecated one. So, we will suggest you to change the method to "setXMLData()".

 

Hope this helps!

Share this post


Link to post
Share on other sites

Thanks Sashibhusan - yes, I removed the toolText attribute from our xml, and the gauges are now rendering correctly.  It looks like they still display a default tooltext on hover, with a value equal to the value charted in the gauge.

 

We'd still like to be able to set our own custom tooltext, of course.  Thanks for looking into this, will keep an eye out for updates.  

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

It seems the issue of custom toolText is present with the current version, which will be fixed in the next release.

 

However, currently we are not able to commit any timeline for the next release. Further any updates on this, we will keep you posted.

Share this post


Link to post
Share on other sites

Hi Krishna,

 

As mentioned earlier, it has been fixed internally. We are hoping the fix to be released in the month of June.

 

We would keep you posted.

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi,

 

Could you please upgrade your current version to the latest, i.e, FusionCharts v3.4 that includes a lot of new features and enhancements and addressed the issue posted in this forum post?

You can see the upcoming new docs at http://docs.fusioncharts.com and new additions at http://docs.fusioncharts.com/tutorial-setup-whats-new.html.

I hope this helps. Looking forward to your valuable feedback.

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