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

X Axis Date format hours

1 Answer 69 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
Thomas Cornelio
Top achievements
Rank 1
Thomas Cornelio asked on 11 Jul 2014, 08:06 AM
Hi,

I am testing the RadHtmlCharts and so far so good.

However, on the X axis i would like to show the hour in the format e.g. 01:00 - 02:00 rather than just showing 01:00 e.g.

Could someone please advise how i can accomplish this.

Attached please find the example chart i am currently using.

Thanks

Tommy

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jul 2014, 09:13 AM
Hi Thomas Cornelio,

Please try the below approach to achieve your scenario. Here I am binding RadHtmlChart using SqlDataSource and in table the x value column I am saving it as "98-99" format.

ASPX:
<telerik:RadHtmlChart runat="server" Width="800px" Height="500px" ID="RadHtmlChart1"
    DataSourceID="SqlDataSource1">
    <PlotArea>
        <Series>
            <telerik:ColumnSeries DataFieldY="Value" Name="Electricity Consumption">
                <TooltipsAppearance Color="White" />
            </telerik:ColumnSeries>
        </Series>
        <XAxis DataLabelsField="Year">
            <LabelsAppearance RotationAngle="75">
            </LabelsAppearance>
            <TitleAppearance Text="Year">
            </TitleAppearance>
        </XAxis>
        <YAxis>
            <TitleAppearance Text="MWh">
            </TitleAppearance>
        </YAxis>
    </PlotArea>
    <Legend>
        <Appearance Visible="false">
        </Appearance>
    </Legend>
    <ChartTitle Text="Electricity Consumption">
    </ChartTitle>
</telerik:RadHtmlChart>

Thanks,
Shinu.
Tags
Chart (HTML5)
Asked by
Thomas Cornelio
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or