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

2 dimension Line graph

3 Answers 63 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Kelvin
Top achievements
Rank 1
Kelvin asked on 16 Jul 2008, 06:52 AM
Hi,

Does anyone know how to populate the line graph with 2 inputs. I'm able to populate the line chart successfully with one input, it appears on Y-axis, but the X-axis shows the counter of the input. For example, if I have value 10,20,30,40. I can see these 4 values appear on the Y-axis but on X-axis shows 1,2,3,4.

What I intend to achieve is to have 2 sets of input. Do anyone has example on this ? or is it possible to do it with RadChart using Line.

Thanks.

3 Answers, 1 is accepted

Sort by
0
Giuseppe
Telerik team
answered on 16 Jul 2008, 01:12 PM
Hi Kelvin,

You can specify the XAxis values for chart series items like this:

<telerik:RadChart ID="RadChart1" runat="Server"
    <Series> 
        <telerik:ChartSeries Name="Series 1"
            <Items> 
                <telerik:ChartSeriesItem Name="Item 1" YValue="15" XValue="12"
                </telerik:ChartSeriesItem> 
                <telerik:ChartSeriesItem Name="Item 2" YValue="10" XValue="20"
                </telerik:ChartSeriesItem> 
                <telerik:ChartSeriesItem Name="Item 3" YValue="25" XValue="5"
                </telerik:ChartSeriesItem> 
                <telerik:ChartSeriesItem Name="Item 4" YValue="50" XValue="10"
                </telerik:ChartSeriesItem> 
            </Items> 
        </telerik:ChartSeries> 
    </Series> 
</telerik:RadChart> 



Best wishes,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kelvin
Top achievements
Rank 1
answered on 17 Jul 2008, 05:48 AM
Hi,

I managed to display value in X-axis. The intension is to display 24 hours in x-axis. For example, 01:00 02:00 .... 23:00

However, the label does not show 01:00 02:00 .... 23:00, instead it shows some other value on the x-axis.

Does anyone try to display HH:MM before ?

Thanks.
0
Giuseppe
Telerik team
answered on 17 Jul 2008, 11:08 AM
Hello Kelvin,

You can review this online example here that demonstrates how you can display DataTime data on the numerical axis of RadChart -- the key is to pass the data via the DataTime.ToOADate(...) method as the chart control works only with numeric data.

Hope this helps.


All the best,
Manuel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Chart (Obsolete)
Asked by
Kelvin
Top achievements
Rank 1
Answers by
Giuseppe
Telerik team
Kelvin
Top achievements
Rank 1
Share this question
or