jcoutre4
-
Content count
2 -
Joined
-
Last visited
Posts posted by jcoutre4
-
-
I'm just starting out with FusionCharts and have used the basic example for ASP.NET as a basis to make different charts successfully, but now when I try and put two of them on the same page in a simple HTML table the charts won't show. I've attached my code so I hope somebody can point out where I've gone wrong. Thanks in advance!
<%@ Page Language="C#" AutoEventWireup="true" Inherits="BasicExample_BasicChart" Codebehind="Chart3.aspx.cs" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>FusionCharts - Simple</title><!-- FusionCharts script tag --><script type="text/javascript" src="../fusioncharts/fusioncharts.js"></script><!-- End --></head><body><table style="width:100%"><tr><td>Chart 1</td><td>Chart 2</td></tr><tr><td><div style="text-align:center"><asp:Literal ID="Literal1" runat="server"></asp:Literal></div></td><td><div style="text-align:center"><asp:Literal ID="Literal2" runat="server"></asp:Literal></div></td></tr></table></body></html>and my Code Behind:using System;using System.Collections;using System.Configuration;using System.Data;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;// Use the `FusionCharts.Charts` namespace to be able to use classes and methods required to create charts.using FusionCharts.Charts;public partial class BasicExample_BasicChart : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){//Initialize the chart.Chart sales = new Chart("pie3d", "myChart", "600", "300", "jsonurl", "../Data/Data.json");// Initialize the second chart.Chart chart2 = new Chart("column3d", "myChart2", "600", "400", "jsonurl", "../Data/Data2.json");// Render the chartLiteral1.Text = sales.Render();Literal2.Text = chart2.Render();}}

Displaying Multiple Charts
in FusionCharts and ASP.NET
Posted · Report reply
SOLVED:
Simply forgot to copy my fusioncharts files to the programs folder!