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

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

1 Answer 267 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dinakaran
Top achievements
Rank 1
Dinakaran asked on 14 Jun 2014, 12:28 PM
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?

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 18 Jun 2014, 08:28 AM
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.

 
Tags
General Discussions
Asked by
Dinakaran
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or