HTML Chart group name not showing

2 posts, 0 answers
  1. sanman02150
    sanman02150 avatar
    4 posts
    Member since:
    Sep 2013

    Posted 16 Oct 2013 Link to this post

    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?
  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1492 posts

    Posted 17 Oct 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top