Recommended Posts

I'm getting the following error while embedding a chart:



DesignTimeError: #25081843 bodystats0.render Error >> #25081843:IECompatibility() 
Chart Id is same as a JavaScript variable name. 
Variable naming error. Please use unique name for chart JS variable, chart-id and container id.
Line 13

Please check page code


<script type="text/javascript" src="/js/jquery.jcarousel.min.js"></script>
<script type="text/javascript">
    jQuery(document).ready(function() {
<div class="carousel_1">
<ul id="mycarousel2" class="jcarousel-skin-tango">
<div id="test1">
<?php Yii::app()->clientScript->registerCoreScript('fusionchartsxt'); ?>
<?php include("fusionchartsxt/includes/FusionCharts.php"); ?>
            $strXML = "<chart caption='' subCaption='' yAxisMaxValue='105' numberSuffix='%25'
            bgColor='FFFFFF'  bgAlpha='0' setAdaptiveYMin='1'
            canvaspadding='10' showCanvasBg ='1' canvasBorderColor='333333'
            showAlternateHGridColor='1' alternateHGridColor='f0f2ea' alternateHGridAlpha='100'
            divLineColor='303200' divLineAlpha='20'
            baseFontColor='666666' showBorder='0'
            lineColor='BBDA00' plotBorderColor='8a8a8a'
            anchorRadius='4' anchorBgColor='303200' anchorBorderColor='FFFFFF' anchorBorderThickness='2'
            toolTipBgColor='EEEEEE' toolTipBorderColor='303200' toolTipColor='666666'
            showValues='1' numberSuffix='' labelDisplay='ROTATE'>";
            $strXML .= "<set label='Asses 1' value='20'  />";
            $strXML .= "<set label='Asses 2' value='30'/>";
            $strXML .= "<set label='Current' value='40' />";
            $strXML .= "<trendlines>";
            $strXML .= "<line startValue='100' color='57C02F' displayValue='Target' />";
            $strXML .= "</trendlines>";
            $strXML .= "<styles>";
            $strXML .= "<definition>";
            $strXML .= "<style name='Font_0' type='font' font='Verdana' size='11' underline='0'  color='666666'  />";
            $strXML .= "<style name='Font_1' type='font' font='Verdana' size='14' color='666666' bold='1' align='left' />";
            $strXML .= "<style  name='LineShadow' type='shadow' angle='45'  distance='1'/>";
            $strXML .= "</definition>";
            $strXML .= "<application>";
            $strXML .= "<apply toObject='DATALABELS' styles='Font_0'/>";
            $strXML .= "<apply toObject='CAPTION' styles='Font_1'/>";
            $strXML .= "<apply toObject='DATAPLOT' styles='LineShadow' />";
            $strXML .= "</application>";
            $strXML .= "</styles>";
            $strXML .="</chart>";
            $unique_chart_id = "mygoalachievements1";
            echo renderChart("/fusionchartsxt/charts/Column2D.swf?r=".rand(), "", $strXML, "$unique_chart_id", 235, 235);
<a href="#" id="ui-carousel-next"><span>next</span></a>
<a href="#" id="ui-carousel-prev"><span>prev</span></a>

Edited by Ganesh Bora

Share this post

Link to post
Share on other sites
Guest Sumedh

Hi Ganesh,


Welcome to FusionCharts Forum!


Can you please enable the debug mode? and send us the debug information?


To enable the debug mode you would need to set the last but one parameter of renderChart method as "true".


Ref. Code:

 echo renderChart("../../FusionCharts/Column3D.swf", "Data/Data.xml", "", "myFirst", 600, 300, true, true); 


Here in above code statement, last but one parameter is set as "true".


Also, can you please send us the browser console information? to turn on the browser console you would need to click on the Developer tools or simply you can use CTRL+SHIFT+I  to turn on the debug console in chrome browser.


Then, again refresh your web-page and go to "Network" tab of browser debug console and click on the web-page which will be appeared in the Network tab list and send us the response information of your web-page (Screen-shot of response tab.)

Share this post

Link to post
Share on other sites



I have resolved the issue by doing litte bit of debugging.

Actually is due to the calling php render method inside the loop of list element <li>


echo renderChart("/fusionchartsxt/charts/Column2D.swf?r=".rand(), "", $strXML, "$unique_chart_id", 235, 235);

  1. calling render method inside Jcarsol
  2. render method returns the javascript variable
  3. as jcarsoal duplicating the li content and as chart rendering div present inside this li output of render which is javascript variable also getting duplicate and thus page gives duplicate variable name issue.

to resolve issue we have moved the render method outside the JCarsoal methode and only placed the chart div after render inside this li.

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