Completed
Last Updated: 17 Feb 2016 07:34 by Doug
ADMIN
Danail Vasilev
Created on: 07 Feb 2014 10:07
Category: HtmlChart
Type: Feature Request
3
ADD templates for the y-axis in RadHtmlChart
For the time being the following workaround can be used:

JavaScript:

    <script>
        function pageLoad() {
            var chart = $find("<%=RadHtmlChart1.ClientID%>");
            chart.get_kendoWidget().options.valueAxis.labels.template = "#if(value > 20) {# Value #=value# is a good option#} else {# value below 20 is a bad option #}#";
            chart.repaint();
        }
    </script>

ASPX:


        <telerik:RadHtmlChart ID="RadHtmlChart1" runat="server" Width="600" Height="300">
            <PlotArea>
                <Series>
                    <telerik:ColumnSeries Name="series 1">
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="30" />
                            <telerik:CategorySeriesItem Y="10" />
                            <telerik:CategorySeriesItem Y="25" />
                            <telerik:CategorySeriesItem Y="20" />
                        </SeriesItems>
                    </telerik:ColumnSeries>
                </Series>
                <YAxis>
                    <LabelsAppearance DataFormatString="dd{0}">
                    </LabelsAppearance>
                </YAxis>
                <XAxis>
                    <Items>
                        <telerik:AxisItem LabelText="item 1" />
                        <telerik:AxisItem LabelText="item 2" />
                        <telerik:AxisItem LabelText="item 3" />
                        <telerik:AxisItem LabelText="item 4" />
                    </Items>
                </XAxis>
            </PlotArea>
        </telerik:RadHtmlChart>

2 comments
Doug
Posted on: 04 Feb 2016 09:31
Thanks Danail you sure know your stuff.
stephen
Posted on: 20 May 2015 07:26
Excellent! Thank you