RadHtmlChart change axis, chart title and points font name and font style from client side

2 posts, 0 answers
  1. Dinakaran
    Dinakaran avatar
    14 posts
    Member since:
    Aug 2013

    Posted 14 Jun 2014 Link to this post

    I am trying to change change axis, chart title and points from client side but i can't able to  find any properties for this from client side. Is this possible to change these values from client side?
  2. Danail Vasilev
    Admin
    Danail Vasilev avatar
    1502 posts

    Posted 18 Jun 2014 Link to this post

    Hi Dinakaran,

    You can do this through the chartObject and then repaint the chart. For example:
    ASPX:
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <script>
        function pageLoad() {
            var chart = $find("<%=ColumnChart1.ClientID%>");
            chart._chartObject.options.series[0].data[0].value = 44000;
            chart._chartObject.options.title.text = "New Title";
            chart.repaint();
        }
    </script>
    <telerik:RadHtmlChart runat="server" ID="ColumnChart1" Width="600px" Height="400px">
        <PlotArea>
            <Series>
                <telerik:ColumnSeries Name="Product 1">
                    <SeriesItems>
                        <telerik:CategorySeriesItem Y="15000" />
                        <telerik:CategorySeriesItem Y="23000" />
                        <telerik:CategorySeriesItem Y="10000" />
                    </SeriesItems>
                </telerik:ColumnSeries>
            </Series>
            <XAxis>
                <Items>
                    <telerik:AxisItem LabelText="1" />
                    <telerik:AxisItem LabelText="2" />
                    <telerik:AxisItem LabelText="3" />
                </Items>
            </XAxis>
        </PlotArea>
        <ChartTitle Text="Product sales for 2011">
        </ChartTitle>
        <Legend>
            <Appearance Position="Bottom" />
        </Legend>
    </telerik:RadHtmlChart>



    Regards,
    Danail Vasilev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top