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

Date on X-axis

1 Answer 58 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Grtjn
Top achievements
Rank 1
Grtjn asked on 08 Mar 2010, 09:48 AM
Hi,

I'm trying to make a radchart showing data from my database.
So far I can show the correct data on my Y-axis, just using a simple query and adding this to the itemssource of the chart.

But when I Want to show the XValues (datetime) I get some issues.
First I improved my query so that I also had my XValues.
(select SUBSTRING(convert(varchar, XValue, 108), 1, 5) XValue, YValue from ...)
This should return just the hour and minutes of the datetime. (i.e. 13:00)

Afterwards I insert the data into a list called RadChartResult:

RadChartList

 

RadChartResult = new RadChartList();

 

 

 

while (reader.Read())

 

{

 

RadChartResult.Add(

new RadChartOEE { Percentage = Convert.ToInt32(reader["YValue"]), Tijdstip = Convert.ToDateTime(reader["XValue"]) });

 

}

 

return RadChartResult;

When running this, still the whole datetime is shown on the X-axis! i.e. thursday 08 march 2010 ...

 

 

 

Can someone plz help or just respond to my post?
Cause so far I didn't get much answers out of this forum...

Kind Regards,

Gj

 

 

1 Answer, 1 is accepted

Sort by
0
Grtjn
Top achievements
Rank 1
answered on 08 Mar 2010, 01:32 PM
I did solve this issue.
So no need to reply anymore!

Gj
Tags
Chart
Asked by
Grtjn
Top achievements
Rank 1
Answers by
Grtjn
Top achievements
Rank 1
Share this question
or