Sign in to follow this  
jithusuji

JavaScript error Expected '('

Recommended Posts

Hi am getting a javascript Error:Expected '(' while loading a chart.I tried with new FusionCharts.dll but of no use can you please advise. The version of dll i am using is 1.2.2.0. If u have a latest version please post here....

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

 

 

 

Welcome to FusionCharts Forum.

 

 

 

I am attaching the FusionCharts.dll version 1.2.2.0. Hope this helps you.

FusionCharts.zip

Share this post


Link to post
Share on other sites

HI Madhumitha i am also using the same version dll anway i replaced it with the dll provided by you but the problem isnt resolved. it works fine with

- <graph caption="[b]Item Wise Values[/b]" subCaption="[b]By Values[/b]" decimalPrecision="[b]0[/b]" divLineColor="[b]FFFFFF[/b]" showNames="[b]1[/b]" numberSuffix="[b]Units[/b]" pieSliceDepth="[b]7[/b]" formatNumberScale="[b]0[/b]">  <set name="[b]Item1[/b]" value="[b]1[/b]" color="[b]AFD8F8[/b]" />   <set name="[b]Item2[/b]" value="[b]2[/b]" color="[b]AFD8F8[/b]" />   <set name="[b]Item3[/b]" value="[b]3[/b]" color="[b]AFD8F8[/b]" />   <set name="[b]Item4[/b]" value="[b]4[/b]" color="[b]AFD8F8[/b]" />   <set name="[b]Item5[/b]" value="[b]5[/b]" color="[b]AFD8F8[/b]" />   <set name="[b]Item6[/b]" value="[b]6[/b]" color="[b]AFD8F8[/b]" /> - <trendlines>  <line startValue="[b]5[/b]" displayValue="[b]Average[/b]" color="[b]009900[/b]" valueOnRight="[b]0[/b]" />   </trendlines>  </graph>

But the javascrippt error Expected '(' occurs for xml such as

- <chart palette="[b]5[/b]" caption="[b]Product Sales[/b]" xAxisName="[b]Month[/b]" yAxisName="[b]Sales[/b]" numberPrefix="[b]$[/b]" rotateValues="[b]1[/b]" placeValuesInside="[b]1[/b]">- <categories>  <category label="[b]January[/b]" />   <category label="[b]February[/b]" />   <category label="[b]March[/b]" />   <category label="[b]April[/b]" />   <category label="[b]May[/b]" />   <category label="[b]June[/b]" />   </categories>- <dataset seriesname="[b]Product A[/b]" color="[b]F0807F[/b]" showValues="[b]1[/b]">  <set value="[b]8343[/b]" />   <set value="[b]6983[/b]" />   <set value="[b]7658[/b]" />   <set value="[b]8345[/b]" />   <set value="[b]8195[/b]" />   <set value="[b]7684[/b]" />   </dataset>- <dataset seriesname="[b]Product B[/b]" color="[b]F1C7D2[/b]" showValues="[b]1[/b]">  <set value="[b]2446[/b]" />   <set value="[b]3935[/b]" />   <set value="[b]3452[/b]" />   <set value="[b]4424[/b]" />   <set value="[b]4925[/b]" />   <set value="[b]4328[/b]" />   </dataset>  </chart>

Please help me,....

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please specify the version of FusionCharts you are using? 

Share this post


Link to post
Share on other sites

Thanks for the quick reply

I am using 1.0.0.0 but i replaced the dll with 1.2.2.0 (only the dll) Do i have to replace the javascript file too if so please post it.

Thanks & Regards

Sujith S

Share this post


Link to post
Share on other sites
Guest Madhumita

Hello,

Could you please specify the version of FusionCharts you are using?

If it is FusionCharts Free the old FusionCharts.js file will suffice.

For FusionCharts V3 you need to use the latest FusionCharts.js available in the download pack.

You can download the trail version of FusionCharts from the link below where you will get the latest Fusioncharts.js file:

http://www.fusioncharts.com/Download.asp

Share this post


Link to post
Share on other sites

HI Madhumita I switched to latest version of Fusion chart v3 but the error is still there i am pulling my hair please help me out.

Thanks & Regards

Sujith S

Share this post


Link to post
Share on other sites

I am sorry my out going mails are blocked. i am attaching here there are three methods in the code CreateChart,CreateCombinationChart,CreateNewChart. The CreateChart works well. the Create new chart i have just copied the XML from Fusionchart site just to test it is also not working..If you want the entire project please let me know.

Codes.ZIP

Edited by Guest

Share this post


Link to post
Share on other sites

Hi,

Could you please change all your " (double quote) to ' (single quote) in your XML and try again?

If it still does not work then please send us the HTML generated code.

Share this post


Link to post
Share on other sites

Ohhh Rahul Kumar Yes now its working like charm Thanks a lot i replaced the double quotes with single quotes and now it works fine....Thanks to Madhumitha also.:):D:D

Share this post


Link to post
Share on other sites

Getting the exact same issue Expected )

 

 

 

I have an AS.Net app with an updatepanel and use the exact same code as your documentation. On load - RenderChart and on postback RenderChartHtml. However, only on postback, the chart is drawn but get the javascript error. All xml contains single quotes. Using a download from a week ago. Pulling my hair out. Spent over a day on this to no avail.

 

 

 

Please help.

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