Set "Smooth" Line Appearance in Code-Behind

3 posts, 0 answers
  1. Dave
    Dave avatar
    13 posts
    Member since:
    May 2012

    Posted 03 Sep 2014 Link to this post


    I have a line chart working with several line series that are generated and added to the RADHTMLChart from the Code-Behind.

    How can I set the LineAppearance to "Smooth" in the code-behind?

    I tried lineSeries1.LineAppearance.LineStyle = "Smooth" but I get an error: "LineAppearance" is read-only.

  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 08 Sep 2014 Link to this post

    Hello Dave,

    You must use the ExtendedLineStyle enum. For example:
    <telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="600px" Height="400px">
                <telerik:LineSeries Name="Product 1">
                        <telerik:CategorySeriesItem Y="15000" />
                        <telerik:CategorySeriesItem Y="23000" />
                        <telerik:CategorySeriesItem Y="10000" />
                    <telerik:AxisItem LabelText="1" />
                    <telerik:AxisItem LabelText="2" />
                    <telerik:AxisItem LabelText="3" />
        <ChartTitle Text="Product sales for 2011">
            <Appearance Position="Bottom" />

    protected void Page_Load(object sender, EventArgs e)
        (RadHtmlChart1.PlotArea.Series[0] as LineSeries).LineAppearance.LineStyle = Telerik.Web.UI.HtmlChart.Enums.ExtendedLineStyle.Smooth;

    Danail Vasilev

    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.

  3. Dave
    Dave avatar
    13 posts
    Member since:
    May 2012

    Posted 11 Sep 2014 in reply to Danail Vasilev Link to this post

    Working great!

Back to Top