Sign in to follow this  
DrLeary

"'ChartMain' is undefined" JavaScript error

Recommended Posts

Hi!

I'm working on an aspx page in SharePoint with some FusionCharts on, and suddenly I notice this little JavaScript warning icon down on the bottom of my browser. It states that "'ChartMain' is undefined", but everything works just fine... I want to get rid of the error though, because it makes the page look less professional...

Looking at the source of the page reveals nothing usefull really...

<!-- START Script Block for Chart ChartMain -->

<div id='ChartMainDiv' align='center'>

Chart.

</div>

<script type="text/javascript">

var chart_ChartMain = new FusionCharts("/kpi/KPIsource/AngularGauge.swf", "ChartMain", "300", "150", "0", "1");

chart_ChartMain.setDataXML("<chart decimalPrecision='1' lowerLimit='0' upperLimit='5' numberSuffix='' chartTopMargin='10' bgColor='ffffff' showBorder='0' chartBottomMargin='20' basefontColor='000000' toolTipBgColor='ffffff' showValue='1'><colorRange><color minValue='0' maxValue='1.99' code='FF654F' /><color minValue='2' maxValue='5' code='8BBA00' /></colorRange><dials><dial value='0.41' rearExtension='10' /></dials></chart>");

chart_ChartMain.render("ChartMainDiv");

</script>

<!-- END Script Block for Chart ChartMain -->

As you can see I've set the Register with JavaScript flag to true, but that doesn't help. The weird thing is, a moment ago the error was about another chart, saying "'ChartDepI' is undefined", so I went to my code and made sure the register with JavaScript flag was set to true for all the charts on the page. That's when the error changed to 'ChartMain' which is the first chart on the page.

Any ideas what this might be?

Share this post


Link to post
Share on other sites

hi,

Make sure that you are using the latest FusionChart.js released on 22 Dec 2007 with FusionCharts v3.0.5 which has some IE related fixes, to solve the IE <FORM> issue. Your error might fall into that since you are using ASP.NET.

Do you update your chart using setDataXML/setDataURL using JavaScript ? If not you may not use registerWithJS option. This option is needed when you want to, using JavaScript, feed data to or get data from (in case of PowerCharts and FusionGadgets) an already loaded chart.

Can you please also tell me wheher you are using ASP.NET.AJAX?

Share this post


Link to post
Share on other sites

Hi!

I am not using AJAX anf the FusionCharts.js file was created December 7. according to it's properties, but it has no version info. I am also using FusionCharts evaluation version (while waiting for my company to buy the full version) and in those folders the FusionCharts.js file was created January 28. Is there any other way I can tell if I have the latest version?

How do I download the laters version of FusionCharts.js? Is there a place on your site where customers can log in and download updates?

Edited by Guest

Share this post


Link to post
Share on other sites

hi,

You can download the latest version of FusionCharts.js that comes with our release 3.0.5+. At the top of the file (if you open it in an editor) version information is given. The latest version is  1.2 (1st November, 2007),modified 21 Dec 2007.

You can have it downloaded from www.fusioncharts.com/download.asp with the Evaluation version.

Share this post


Link to post
Share on other sites

What is the latest version for FusionMaps.js? I'm getting similar errors using registerJs w/ my maps (bad enough that I can't use that function.)

 

 

 

The map is in a .NET application - so I'm thinking issue is the same.

 

 

 

The fusionMaps.js file I have (just downloaded last week) is from 6/2007.

Share this post


Link to post
Share on other sites

Hi Sudipto,

Bill might also be wondering what the latest version of FusionMaps is from his last post.  Actually I'm having the same exact problem as Bill with FusionMaps in SharePoint.  The maps are cannot be referenced via JavaScript and just throw that JavaScript error when attempting to activate JS on them.

FusionCharts is working fine though in my sharepoint with latest FusionCharts.js.

Share this post


Link to post
Share on other sites
Guest Rajroop

Hi all,

 

We proudly announce the release of FusionCharts for SharePoint in beta. FusionCharts for SharePoint helps you create interactive & data-driven charts in SharePoint, without having to write a line of code. The charts are created using a wizard and can connect to various data sources such as SharePoint Lists, CSV, MS SQL, Oracle, Excel & BDC. You can add drill-down and export capabilities to each chart and configure both cosmetic and functional aspects.

 

 

You can download the fully-functional version from www.fusioncharts.com/sharepoint - we would love to have your feedback on this.

 

Please post your suggestions and any bugs as replies to the forum thread at:

FusionCharts for SharePoint beta impression

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