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

How to change or fix the chart type from AreaChart to LineChart

1 Answer 21 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ravi
Top achievements
Rank 1
Ravi asked on 26 May 2016, 03:01 PM

Hi,

 

I have coded the ASPX page for LineChart (same as in the demo code) as below. But the chart is displayed as an AreaChart, not a LineChart.

Is the any way or dynamic code that i can force the chart from Area Chart to Line Chart?

 <telerik:RadHtmlChart runat="server" ID="LineChart" Width="800" Height="500" Transitions="true" Skin="Silk"> ........

<Series><telerik:LineSeries Name="Week 1">

     <SeriesItems>

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 26 May 2016, 05:09 PM
Hi Ravi,

I assume that you are referring this RadHtmlChart's demo:
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/charttypes/areachart/defaultcs.aspx

I tested it but it is rendering Line chart properly on my side. Can you, please, elaborate a bit on the exact scenario in which the Line chart is rendered as Area one on your side? Can you give us the whole configuration leading to this behavior?

Can you test whether you are experiencing the same problem with the chart below?
    <telerik:RadHtmlChart runat="server" ID="LineChart" Width="800" Height="500" Transitions="true">
    <PlotArea>
        <Series>
            <telerik:LineSeries Name="Week 15" >
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="15" />
                    <telerik:CategorySeriesItem Y="23" />
                    <telerik:CategorySeriesItem />
                    <telerik:CategorySeriesItem Y="71" />
                    <telerik:CategorySeriesItem Y="93" />
                </SeriesItems>
            </telerik:LineSeries>
            <telerik:LineSeries Name="Week 16">
                <SeriesItems>
                    <telerik:CategorySeriesItem Y="35" />
                    <telerik:CategorySeriesItem Y="42" />
                    <telerik:CategorySeriesItem Y="18" />
                    <telerik:CategorySeriesItem Y="39" />
                    <telerik:CategorySeriesItem Y="9" />
 
                </SeriesItems>
            </telerik:LineSeries>
        </Series>
    </PlotArea>
    <ChartTitle Text="Server CPU Load By Days">
    </ChartTitle>
    <Legend>
        <Appearance Position="Bottom" />
    </Legend>
</telerik:RadHtmlChart>


Regards,
Vessy
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
General Discussions
Asked by
Ravi
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or