Sign in to follow this  
Vyas

Fusioncharts Xt Trial Version - 2 Charts

Recommended Posts

I have downloaded the FusionCharts XT trial version for evaluation purpose. The first 2 charts came properly, but when I tried with the third chart, its rendering on the first chart itself and a text 'Chart.' is displayed at the 3rd literal.

Does trial version is equipped to display only 2 charts?

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

 

The process of embedding multiple charts is similar to that of embedding a single chart. You just need to take care of the following:

 

1.Each chart on the page should have a unique DOM-Id (which is specified in the JavaScript constructor).

 

2.Each chart should be denoted by a unique JavaScript variable name (e.g., var chart1 = new FusionCharts (...); var chart2 = new FusionCharts(...); ).

 

3. Each chart should be rendered in separate HTML container (DIV, SPAN etc), each container having unique id. The chart embedding code must contain a reference to the ID of the container where the chart is to be rendered ( render("chart1div") ; .. render("chart2Div"); ).

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

Thanks for your answer, but we are using C#, please find the code below.



aspx code

<div style="float:left; min-width:250px; border:0px solid red;">
<asp:Literal ID="ltrlGrphStock" runat="server"></asp:Literal> 
</div>

<div style="float:left; margin-left:3px; border: 0px solid #000;">
<asp:Literal ID="ltrGrphItemPhase" runat="server"></asp:Literal> 
</div>


<div style="float:left; margin-left:3px; border: 0px solid #000;">
<asp:Literal ID="ltrGrphForex" runat="server"></asp:Literal>
</div>

aspx.cs code

Generated the XML data and,

ltrlGrphStock.Text = FusionCharts.RenderChart("Charts/Pie2D.swf", "", xmlData.ToString(), "", "300", "250", false, true);

ltrGrphItemPhase.Text = FusionCharts.RenderChart("Charts/MSColumn3D.swf", "", xmlData.ToString(), "productSales", "550", "250", false, true);

ltrGrphForex.Text = FusionCharts.RenderChart("Charts/Line.swf", "", xmlData2.ToString(), "", "300", "250", false, true);

 

 

 

First we generated two graps, worked perfectly, but when we added one more graph, the 3rd graph is rendering on the first literal and on the third literal a text appears as 'Chart.' .

Are we not trying it correctly?

 

Thanks...

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Thanks for your response.

 

Any of these listed reasons can cause this error to occur:

 

1.You have not set correct path of FusionCharts.js in your code.

 

2. The page contains JavaScript error.

 

3. If you are setting the data as XML/JSON String, you might be including new-line characters in the XML/JSON string. New line characters in XML/JSON string cause JavaScript error.

 

Also note that creating multiple charts in a page is as easy as creating a single chart. You can call RenderChart method and create as many charts as you wish. All you would need to take care is that you should render each chart in a separate Literal. Each chart should also have unique Id.

 

Hope this helps.

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