My script displays Time in X axis and Day_of_week in the Y axis. My script displays multiple columns for each day_of_week i.e. there are five 5x2 (start_time and end_time) columns for Monday and each column has Monday as the Y axis label. I would like to group those columns to display one day_of_week name in the Y axis label.
Could someone please help.
Here is my code.
select cycle,day_of_week, start_time, end_time from df_qfs_time_logs order by day_of_week
cycle day_of_week start_time end_time
-------------------------------- ------------------------ ---------- ---------
EARLY MORNING FRIDAY 09:03:00 09:18:00
MORNING FRIDAY 10:58:00 11:14:00
NOON FRIDAY 12:38:00 12:52:00
AFTERNOON FRIDAY 14:48:00 15:03:00
LATE AFTERNOON FRIDAY 16:47:00 17:03:00
END OF DAY FRIDAY 20:45:00 21:10:00
END OF DAY MONDAY 23:35:00 23:59:00
LATE AFTERNOON MONDAY 16:48:00 17:04:00
AFTERNOON MONDAY 14:53:00 15:08:00
NOON MONDAY 12:43:00 12:58:00
MORNING MONDAY 10:38:00 10:53:00
EARLY MORNING MONDAY 07:58:00 08:12:00
EARLY MORNING THURSDAY 07:48:00 08:00:00
MORNING THURSDAY 10:33:00 10:46:00
NOON THURSDAY 12:32:00 12:46:00
AFTERNOON THURSDAY 14:37:00 14:51:00
LATE AFTERNOON THURSDAY 16:37:00 16:52:00
END OF DAY THURSDAY 21:00:00 21:23:00
END OF DAY TUESDAY 21:00:00 21:23:00
EARLY MORNING TUESDAY 07:53:00 08:07:00
MORNING TUESDAY 10:43:00 10:57:00
NOON TUESDAY 12:48:00 13:02:00
AFTERNOON TUESDAY 14:53:00 15:07:00
LATE AFTERNOON TUESDAY 16:47:00 17:03:00
EARLY MORNING WEDNESDAY 07:53:00 08:07:00
MORNING WEDNESDAY 10:43:00 10:57:00
AFTERNOON WEDNESDAY 14:53:00 15:07:00
NOON WEDNESDAY 12:39:00 12:53:00
LATE AFTERNOON WEDNESDAY 16:47:00 17:03:00
END OF DAY WEDNESDAY 21:00:00 21:25:00
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:Chart ID="Chart1" runat="server">
<legends>
<asp:Legend Name="legend" />
</legends>
<series>
<asp:Series Name="Series1" YValueType="Time" />
<asp:Series Name="Series2" YValueType="Time" />
</series>
<chartareas>
<asp:ChartArea Name="ChartArea1">
</chartareas>
<asp:Button ID="btnChart" runat="server" Text="Click" OnClick="btnChart_onclick" />
<asp:Label ID="LblResponse" runat="server" />
Protected Sub loadchartdata()
Dim strcmd As String = "select RTRIM(day_of_week) as DAYS,RTRIM(convert(time,start_delivery)) as START, RTRIM(convert(time,end_delivery))as ENDT from df_delivery_time order by day_of_week, start_delivery"
Dim da As New SqlDataAdapter(strcmd, dbconn)
Dim table As New DataTable()
da.Fill(table)
Dim dv As DataView = table.DefaultView
Chart1.Series("Series1").Points.DataBindXY(dv, "cycle", dv, "START")
Chart1.Series("Series2").Points.DataBindXY(dv, "cycle", dv, "ENDT")
Chart1.Series("Series1").ChartType = SeriesChartType.Column
Chart1.Series("Series2").ChartType = SeriesChartType.Column
Chart1.Series(0).XValueType = DataVisualization.Charting.ChartValueType.DateTime
End Sub