Hello,
I'm trying to display my individual start/stop datetimes by asset in a single bar, as seen in mockup.png.
I have been working with the Range Bar tied to my SQL data and am currently getting results seen in the results.png file.
My stored proc is returned results seen in SQL Proc.png
My questions are:
- How do I group my YAxis so that I see 1 bar for the asset?
- How do I show times along the X Axis? When I formatted to HH:MM, I didn't get any results in the chart.
Here is the code I'm using:
<%@ Page Language="VB" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="ShiftTimeline._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
<form id="form1" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
</Scripts>
</telerik:RadScriptManager>
<script type="text/javascript">
//Put your JavaScript code here.
</script>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<div>
<telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" DataSourceID="SqlDataSource1" Height="648px" Width="978px" >
<PlotArea >
<XAxis DataLabelsField = "MachineName" >
</XAxis>
<YAxis Name="MinsElapsed" >
</YAxis>
<Series>
<telerik:RangeBarSeries DataFromField="StartDate" DataToField="EndDate" Name="RangeBarSeries1">
</telerik:RangeBarSeries>
</Series>
</PlotArea>
</telerik:RadHtmlChart>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ProdMGRConnectionString %>" SelectCommand="bbx_rpt_MachineTruth2" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter DefaultValue="999" Name="MachineID" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
</div>
</form>
</body>
</html>
Many thanks,
David