I'm new to the radchart databinding process and after spending an excessive amount of time trying to figure out why I'm not showing any return when I bind to the database I thought I'd ask the sea of experts. I'm sure this has been discussed but when I searched on databinding I only got three posts so please excuse if I am repeating something previously shown.
Attached is a screen shot of what I see currently. The XAxis labels (2008 2009 2010...) are pulled from the database and are displaying as I expected. What isn't showing are the values reflected in the rest of the table. This is pretty straightforward and I'm positive it is something exceptionally simple I'm overlooking but can anyone shed some light on what that might be? I've gotten lost in the mixed examples that came with this add-on so I'm not sure where I'm crossing signals.
Below is the code for my chart.aspx page and it's code behind. The binding taking place in the code behind file is simply binding to a data object that I've created but isn't really relevant to this issue since all it does is open,get, close the database.
Thanks in advance.
Tony
Chart.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="chart.aspx.cs" Inherits="myworkcalpassplus.chart" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" Visible="false"/>
<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
<div style="width: 800px; height: 500px;">
<telerik:RadHtmlChart runat="server" Width="800px" Height="500px" ID="RadHtmlChart1" >
<PlotArea>
<YAxis MaxValue="100" MinValue="0" Step="10" >
<TitleAppearance Text="Units"></TitleAppearance>
</YAxis>
<XAxis DataLabelsField="AcademicYear"></XAxis>
<Series>
<telerik:ColumnSeries Name="Average" DataFieldY="Average" >
<TooltipsAppearance Color="White" BackgroundColor="Orange" DataFormatString="P"/>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="Top 10 Region" DataFieldY="Top10Region">
<TooltipsAppearance Color="White" BackgroundColor="Orange" DataFormatString="P"/>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="Statewide" DataFieldY="Statewide">
<TooltipsAppearance Color="White" BackgroundColor="Orange" DataFormatString="P"/>
</telerik:ColumnSeries>
</Series>
</PlotArea>
<Legend>
<Appearance Visible="false">
</Appearance>
</Legend>
<ChartTitle Text="STEM Dashboard">
</ChartTitle>
</telerik:RadHtmlChart>
</div>
</form>
</body>
</html>
Codebehind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace myworkcalpassplus
{
public partial class chart : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Data chartData = new Data();
RadHtmlChart1.DataSource = chartData.GetChartData();
RadHtmlChart1.DataBind();
}
}
}
}
Mind you I was following along with several examples and that's what I ended up with expecting just to see a simple chart display.
Thanks again!
Attached is a screen shot of what I see currently. The XAxis labels (2008 2009 2010...) are pulled from the database and are displaying as I expected. What isn't showing are the values reflected in the rest of the table. This is pretty straightforward and I'm positive it is something exceptionally simple I'm overlooking but can anyone shed some light on what that might be? I've gotten lost in the mixed examples that came with this add-on so I'm not sure where I'm crossing signals.
Below is the code for my chart.aspx page and it's code behind. The binding taking place in the code behind file is simply binding to a data object that I've created but isn't really relevant to this issue since all it does is open,get, close the database.
Thanks in advance.
Tony
Chart.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="chart.aspx.cs" Inherits="myworkcalpassplus.chart" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
<telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true" Visible="false"/>
<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
<div style="width: 800px; height: 500px;">
<telerik:RadHtmlChart runat="server" Width="800px" Height="500px" ID="RadHtmlChart1" >
<PlotArea>
<YAxis MaxValue="100" MinValue="0" Step="10" >
<TitleAppearance Text="Units"></TitleAppearance>
</YAxis>
<XAxis DataLabelsField="AcademicYear"></XAxis>
<Series>
<telerik:ColumnSeries Name="Average" DataFieldY="Average" >
<TooltipsAppearance Color="White" BackgroundColor="Orange" DataFormatString="P"/>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="Top 10 Region" DataFieldY="Top10Region">
<TooltipsAppearance Color="White" BackgroundColor="Orange" DataFormatString="P"/>
</telerik:ColumnSeries>
<telerik:ColumnSeries Name="Statewide" DataFieldY="Statewide">
<TooltipsAppearance Color="White" BackgroundColor="Orange" DataFormatString="P"/>
</telerik:ColumnSeries>
</Series>
</PlotArea>
<Legend>
<Appearance Visible="false">
</Appearance>
</Legend>
<ChartTitle Text="STEM Dashboard">
</ChartTitle>
</telerik:RadHtmlChart>
</div>
</form>
</body>
</html>
Codebehind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace myworkcalpassplus
{
public partial class chart : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Data chartData = new Data();
RadHtmlChart1.DataSource = chartData.GetChartData();
RadHtmlChart1.DataBind();
}
}
}
}
Mind you I was following along with several examples and that's what I ended up with expecting just to see a simple chart display.
Thanks again!