- Home
- Forum
- ASP.NET Web Forms
- Chart no displaying
Chart no displaying
Hi, I'm starting out with Syncfusion and trying a basic test.
I am following the online example and everything seems to be configured correctly.
Onscreen the chart is showing in asp.net but when I run the debugger (local host) the screen remains blank.
I have copied the data (as per online example) into code behind.
Pasting code below.
Please help.
rgs
aspx as follows:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="SyncfusionASPNETWebApplication1.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="http://cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></script>
<!-- Essential JS UI widget -->
<script src="http://cdn.syncfusion.com/15.3.0.33/js/web/ej.web.all.min.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<ej:Chart ID="Chart1" runat="server">
<Title Text="Sales Analysis"></Title>
<Series>
</Series>
</ej:Chart>
</div>
</form>
</body>
</html>
and codebehind:
namespace SyncfusionASPNETWebApplication1
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
List<ChartData> data = new List<ChartData>();
data.Add(new ChartData("Jan", 35));
data.Add(new ChartData("Feb", 28));
data.Add(new ChartData("Mar", 34));
data.Add(new ChartData("Apr", 32));
data.Add(new ChartData("May", 40));
data.Add(new ChartData("Jun", 32));
data.Add(new ChartData("Jul", 35));
data.Add(new ChartData("Aug", 55));
data.Add(new ChartData("Sep", 38));
data.Add(new ChartData("Oct", 30));
data.Add(new ChartData("Nov", 25));
data.Add(new ChartData("Dec", 32));
this.Chart1.DataSource = data;
this.DataBind();
}
}
public class ChartData
{
public string Month;
public double Sales;
public ChartData(string month, double sales)
{
this.Month = month;
this.Sales = sales;
}
}
SIGN IN To post a reply.
3 Replies
SK
Saravana Kumar Kanagavel
Syncfusion Team
November 8, 2017 10:00 AM UTC
Hi Zack,
Thanks for contacting Syncfusion Support.
We have analyzed your query and code. After, we have tried to reproduce the reported issue in our sample using your code but not able to reproduce the issue at our end.
So please ensure the following configuration steps with web.config file in your sample.
Step #1 : To ensure the same version of assemblies are referred to render chart.
1. Syncfusion.EJ.Web , Version – 15.3451.0.26
2. Syncfusion.EJ, Version - 15.3451.0.26
Step #2: To ensure the same version of .NetFrameWork version referred in DLL’s version
Note : If you want to create the project in another .NET framework , then you should refer the DLL’s version based on the .Net framework version.
Step #3 : To ensure the required to render chart “assembly” are registered at assemblies section.
|
[Web.config]
<assemblies>
<add assembly="Syncfusion.EJ.Web" />
<add assembly="Syncfusion.EJ" />
</assemblies> |
Step #4 : Please remove the version, culture and PublicKeyToken in assemblies referred section.
|
[Web.config]
<assemblies>
<add assembly="Syncfusion.EJ.Web, Version=15.3452.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
<add assembly="Syncfusion.EJ, Version=15.3452.0.26, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89" />
</assemblies> |
Step #5: To ensure the “namespace” are registered for assemblies at controls section.
|
[Web.config]
<controls>
<add namespace="Syncfusion.JavaScript.Web" assembly="Syncfusion.EJ.Web" tagPrefix="ej"/>
<add namespace="Syncfusion.JavaScript.DataVisualization.Models" assembly="Syncfusion.EJ" tagPrefix="ej"/>
</controls> |
Step #6: To ensure the requires scripts to render chart in the ASPX Page
|
[ASPX]
<script src="Scripts/ej/jquery-1.10.2.min.js"></script>
<script src="Scripts/ej/ej.web.all.min.js"></script> |
And we have attached the sample for your reference and kindly find the below location.
Please find the output of the sample below
Please let us know if you have concern.
Regards,
Saravana Kumar K
ZS
Zack Snyders
November 9, 2017 09:08 AM UTC
Got it working now.
Thank you for your help
rgs
Zack
SK
Saravana Kumar Kanagavel
Syncfusion Team
November 10, 2017 10:40 AM UTC
Hi Zack,
Thanks for your update.
Please let us know if you need any other assistance on this.
Regards,
Saravana Kumar K
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
ZS Zack Snyders
- Nov 7, 2017 01:03 PM UTC
- Nov 10, 2017 10:40 AM UTC