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

HTML Chart group name not showing

1 Answer 68 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
sanman02150
Top achievements
Rank 1
sanman02150 asked on 16 Oct 2013, 02:06 PM
I am trying to make a basic chart like http://www.telerik.com/help/aspnet-ajax/media/htmlchart-columnchart-simple-example.png

I am able to get it to mark up the chart with the Sales numbers, but I am not able to get the chart to show "Q1", "Q2", "Q3", etc as the name of the columns.

What do i have to do to show the column names on the chart?

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 17 Oct 2013, 03:59 PM
Hello,

You can use the ClientTemplate functionality of the RadHtmlChart, in order to display the category of SeriesItems in labels/tooltips. For example:
<telerik:RadHtmlChart runat="server" ID="ColumnChart" Width="800" Height="500">
    <PlotArea>
        <XAxis>
            <Items>
                <telerik:AxisItem LabelText="Q1"></telerik:AxisItem>
                <telerik:AxisItem LabelText="Q2"></telerik:AxisItem>
                <telerik:AxisItem LabelText="Q3"></telerik:AxisItem>
            </Items>
        </XAxis>
        <Series>
            <telerik:ColumnSeries Name="Wooden Table">
                <LabelsAppearance Position="OutsideEnd">
                    <ClientTemplate>
                        Value is #=value#, Category is: #=category#
                    </ClientTemplate>
                </LabelsAppearance>
                <TooltipsAppearance>
                    <ClientTemplate>
                        Value is #=value#, Category is: #=category#
                    </ClientTemplate>
                </TooltipsAppearance>
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="25000"></telerik:CategorySeriesItem>
                    <telerik:CategorySeriesItem Y="12000"></telerik:CategorySeriesItem>
                    <telerik:CategorySeriesItem Y="39000"></telerik:CategorySeriesItem>
                </SeriesItems>
            </telerik:ColumnSeries>
        </Series>
    </PlotArea>
</telerik:RadHtmlChart>

More information on using ClientTemplates is available in Main properties section of ClientTemplate for Series Labels and Tooltips Overview help article.

Regards,
Danail Vasilev
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Chart (HTML5)
Asked by
sanman02150
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or