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

Chart - ASP.NET AJAX Q2

1 Answer 67 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
yossi
Top achievements
Rank 1
yossi asked on 20 Aug 2008, 04:23 PM
Hello,

Im using radchart ajax Q2.

well,i have a problem i cant solve,actually its a bit difficult to explain so i will use a specific example.

my chart should display data about a single stock market - rate distribution.

the data can be calculate for different times durations:

1)Past Week (from today) -
   in this case i need to display on the XAxis 7 days = 7 points.
2)Past Month (from today) -
   in this case i need to display 4 weeks = 4 points.
3)Past 6 Months (from today) - 
   in this case i need to display 6 months = 6 points.
4)Past Year (from today) -
   in this case i need to display 4 quarters = 4 points.
5)Past 2 Years (from today) - 
   in this case i need to display 4 halfs = 4 points.
6)Betwwen 2 dates the user insert.

the user can choose the frequency to calculate the rates:

daily  = i get an average rates for every single day between 2 dates(dynamicly).

weekly = i get an average rates for every single week between 2 dates(dynamicly).

monthly = i get an average rates for every single month between 2 dates(dynamicly).

yearly = i get an average rates for every single year between 2 dates(dynamicly).

OK,the problem begin here,for example :

the user can choose to display a chart for the past 6 months in 3 ways of frequency:
1)Daily -
   in this case my data source contains an average rate for each day = 180 points
2)Weekly - in this case my data source contains 4*6 = 24 points.
3)Monthly - in this case my data source contains 6 points for each month.

well,finally,my problom is that the Y values are not correlated to the X values,
i mean:

1)i have 180 Y values and 6 X values.

2)i have 24 Y values and 6 X values

3)i have 6 Y values and 6 X values.

how do i handle it ? is there any solution ?

Thank you in advanced,

yossi.






1 Answer, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 21 Aug 2008, 11:54 AM
Hi Yossi,

You can achieve this by using the OLEAutomation date equivalents of the dates in your datasource. You will also need to populate the XValue property of each ChartSeriesItem. This can be done manually or by specifying the DataXColumn property of the ChartSeries before databinding the chart. You can find a similar example here.

Hope this helps.

All the best,
Ves
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Chart (Obsolete)
Asked by
yossi
Top achievements
Rank 1
Answers by
Ves
Telerik team
Share this question
or