Guest Basundhara Ghosal

Name 'FusionCharts' is not declared

Recommended Posts

I use the code for BasicDataXML.aspx and the charts (Doughnut and bar2) are rendered well, but I always have an error in my list. This is ealle annoying because it's a fatal error so I can't go with developping unless I must always delete the file and afterwards I put it again ... everything seems OK the only thing is with -->

Return

FusionCharts.RenderChartHTML("../FusionCharts/Doughnut2D.swf", "", xmlData.ToString(), "myNext", "800", "500", False) that seems to be wrong, although the chart is rendered on teh screen. It seems to me than it has something to do with quotes ????

I've got a Bin directory with FusionCharts.cs and FusionCharts.dll  I made a new map on the same level as BasicDataXLM called FusionCharts and that contains FusionCharts.js, and Doughnut2D.swf ....

 

My Code is ....

Imports

InfoSoftGlobal

Imports

System.Text

Partial

Class BasicDataXML

Inherits System.Web.UI.Page

Public Function GetMonthlySalesChartHtml() As String

'This page demonstrates the ease of generating charts using FusionCharts.

'For this chart, we've used a string variable to contain our entire XML data.

'Ideally, you would generate XML data documents at run-time, after interfacing with

'forms or databases etc.Such examples are also present.

'Here, we've kept this example very simple.

'Create an XML data document in a string variable

Dim xmlData As StringBuilder = New StringBuilder()

xmlData.Append(

"<chart caption='Overzicht werkbaar jasje' xAxisName='Month' yAxisName='Units' showValues='1' formatNumberScale='0' showBorder='0' bgColor='FFFFFF' >")

xmlData.Append(

"<set label='Woorden en uitdrukkingen gebruiken' value='8' />")

xmlData.Append(

"<set label='Begrippen tijd kunnen hanteren' value='3' />")

xmlData.Append(

"<set label='Begrippen tijd kunnen hanteren' value='5' />")

xmlData.Append(

"<set label='blablabla' value='2' />")

xmlData.Append(

"<set label='het woord in de juiste context gebruiken' value='12' />")

xmlData.Append(

"</chart>")

'Create the chart - Column 3D Chart with data from xmlData variable using dataXML method

Return FusionCharts.RenderChartHTML("../FusionCharts/Doughnut2D.swf", "", xmlData.ToString(), "myNext", "800", "500", False)

End Function

 

 

End

Class

And in HTML:

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="BasicDataXML.aspx.vb" Inherits="BasicDataXML" EnableSessionState="TRUE" %>

<

html>

<

head>

<title>FusionCharts - Simple Column 3D Chart using dataXML method </title>

<style type="text/css">

body {background-color: #FFFFFF; /*change color to suit*/

}

.style1

{

width: 98%;

}

.style2

{

width: 189px;

}

</style>

</

head>

<

body>

<form id='form1' name='form1' method='post' runat="server">

<table class="style1">

<div align="center">

<tr>

<td align="center" class="style2">

<asp:ImageButton ID="btnMenu" runat="server" Height="50px" width="50px"

ImageUrl="~/graphics/home.gif"

PostBackUrl="leerplan_menu.aspx" ImageAlign="Top" />

<asp:ImageButton ID="ImageButton1" runat="server"

ImageUrl="~/graphics/doughnut.jpg" ImageAlign="Top" />

<asp:ImageButton ID="ImageButton2" runat="server" Height="48px"

ImageAlign="Top" ImageUrl="~/graphics/bar.gif" Width="50px" />

</td>

<td> <%=GetMonthlySalesChartHtml()%></td>

</div>

</tr>

<tr>

<td class="style2">

 </td>

<td align="center" class="style3">

<hr />

</td>

</tr>

</table>

</form>

</

body>

</

html>

 

The error Code is: Name 'FusionCharts' is not declared

 

 

Can someone please help me ???

Thxs

Edited by Guest

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Havik,

Welcome to FusionCharts Forum. :D

Could you please send us the screen-shot of the error that you are receiving?

Awaiting your reply. :hehe:

Share this post


Link to post
Share on other sites

With pleasure ....

 

If this problem can be solved, I'll buy the product, because I find it very good !!!

 

I attached a screenshot of the directory as well !

 

Greetings

 

Serge

post-7773-128441580462_thumb.jpg

post-7773-128441580476_thumb.jpg

post-7773-128441580481_thumb.jpg

Edited by Guest

Share this post


Link to post
Share on other sites

I think I've solved the problem.

 

In Visual Studio 2008 you need to bind the assembly on the application. It is not enough to put the FusionCharts.dll under the Bin directory, you have to add 'Add reference' at you project, so the application knows that he must look for 'InfoSoftGlobal'

 

At the moment all my errors are away ....

 

Thxs, anyway for the response ...

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi Havik,

You are welcome. :D

Glad to know that your issue is resolved.

Happy FusionCharting. :)

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Could you please specify the issue a bit elaborately?

Awaiting your reply. :D

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