This is a migrated thread and some comments may be shown as answers.

Group items in Range Bar

1 Answer 85 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 31 Mar 2017, 03:49 PM

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

 

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 05 Apr 2017, 12:18 PM
Hello David,

We just answered your support ticket. 

I recommend we continue the discussion there to avoid any duplication. 

Once we have any closure we can share the solution here for convenience and better visibility from the community.

Regards,
Peter Milchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Chart (HTML5)
Asked by
David
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or