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

Problem PLOT in CHART

7 Answers 82 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Heri .
Top achievements
Rank 1
Heri . asked on 25 Mar 2010, 09:26 AM
I'm create Web with CHART and my data in XML like this :

<graph >
<Set Time="08:10" value="5"/>
<Set Time="08:20" value="15"/>
<Set Time="08:30" value="10"/>
<Set Time="08:40" value="30"/>
<Set Time="08:50" value="20"/>
</graph>

And i want Time as Y axis like this picture. and i want result like that (Attach)

Please help

Heri

http://www.exlogsarana.com
http://www.pbutenergy.org

7 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 25 Mar 2010, 03:21 PM
I think the best articles for you to read over would be the following


These should help you in in terms of actually binding the data to your RadChart. As you can see you can define whatever attributes you want from your XML file as the X-axis and Y-axis values. From there you can read over the various sections in the RadChart Documentation to see what you can do in terms of labels and the various appearance changes you can do (both at run-time and design time).
0
Heri .
Top achievements
Rank 1
answered on 29 Mar 2010, 07:16 AM
Please detail answer....

Help me
0
Schlurk
Top achievements
Rank 2
answered on 29 Mar 2010, 09:58 PM
I copied and pasted your XML into a new XML file (Called XMLFile.xml) in Visual Studio 2008 and then set up a XmlDataSource. I then used the following markup to get something similar to what you wanted :)

    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="XmlDataSource1" SeriesOrientation="Horizontal"
        <Series> 
            <telerik:ChartSeries DataYColumn="value" Name="value" Type="Line"
            </telerik:ChartSeries> 
        </Series> 
        <PlotArea> 
            <XAxis DataLabelsColumn="Time"></XAxis> 
        </PlotArea> 
    </telerik:RadChart> 
    <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/XMLFile.xml"></asp:XmlDataSource> 

0
Heri .
Top achievements
Rank 1
answered on 29 Mar 2010, 11:56 PM
i wan like this (attach)
0
Heri .
Top achievements
Rank 1
answered on 30 Mar 2010, 12:28 AM
i wan like this (attach)
0
Schlurk
Top achievements
Rank 2
answered on 01 Apr 2010, 04:02 PM
If you want the data to be displayed in that fashion (with the lowest of the times being up top) you will have to define your XML file in the following way:

<?xml version="1.0" encoding="utf-8" ?> 
<graph > 
  <Set Time="08:50" value="20"/> 
  <Set Time="08:40" value="30"/> 
  <Set Time="08:30" value="10"/> 
  <Set Time="08:20" value="15"/> 
  <Set Time="08:10" value="5"/> 
</graph> 
 

And in order to only display every-other label you just need to set up the LabelStep property like the following (you can use my previous code just add this):
        <PlotArea> 
            <XAxis DataLabelsColumn="Time" LabelStep="2"></XAxis> 
        </PlotArea> 

That should take care of everything and have it set up just like you want it :)



0
Heri .
Top achievements
Rank 1
answered on 27 Apr 2010, 10:05 AM
How to use Diameter scale in this chart ?
Tags
Chart (Obsolete)
Asked by
Heri .
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Heri .
Top achievements
Rank 1
Share this question
or