Author |
Topic  |
|
wdahl99
10 Posts |
Posted - 07 Jun 2005 : 12:21:44
|
I would like to create a multiline plot with 4 data groups and approx 21000 datapoints in each group. The graph fails to update after about 5400 datapoints per group. The x axis is actually a date/time but the GroupData set will only take double for the x data set.
I have created 2 arrays double xData = new double[datapoints]; double []yData = new double[groups,datapoints]; GroupDataset data1 = new GroupDataset("Junk",xData,yData);
The create a MultilinePlot after setting the attributes.
Any suggestions?
Thanks
Wayne
using c# 2003 .net framework 1.1 |
|
quinncurtis
1164 Posts |
Posted - 07 Jun 2005 : 12:49:15
|
There is no limit in the software that would cause a limit of 5400 points in a MultiLine plot. You can change the numPoints value in the ChartTabDemo.MultiLine example program to 21000 and it works fine (it shows up as the Line | MultiLine tab when you run the ChartTabDemo example). The x-values extend from 0 to 4100, which with a 0.2 step size for x corresponds to 21000 points/group. See if you can reproduce a problem using that example.
If you want the x-values to be date/time, why are you not using the TimeGroupDataset, which supports time/date x-values and numeric y-values ?
|
 |
|
wdahl99
10 Posts |
Posted - 08 Jun 2005 : 14:06:17
|
Thanks. I actually had one bad data point that i did not spot.
I did also switch to a TimeGridDataset. The problem now is that my x-values represent a trading day of 6 hours, 8pm-2am, then I have another day with data from 8pm-2am. When I plot the 2 days I get a flat line where I have no datapoints from approx 2am - 8pm the next day. Is there a way to supress the timeaxis when my xValues array has no values for that time?
thanks |
 |
|
quinncurtis
1164 Posts |
Posted - 08 Jun 2005 : 14:44:44
|
The QCChart2DNetManual.pdf user manual, Chapter 4, Scaling and Coordinate Systems, discusses this. See the ChartTabDemo.OHLCFinPlot example. |
 |
|
wdahl99
10 Posts |
Posted - 08 Jun 2005 : 15:39:56
|
Thanks for the info. Here is what I have done:
TimeGroupDataset data1 = new TimeGroupDataset("Implied",xValues,priceData); long starttod = (20*60)*60*1000; //start at 8:00 PM long stoptod = 2*60*60*1000; //stop at 2:00 AM TimeCoordinates p1 = new TimeCoordinates(); p1.SetWeekType(ChartObj.WEEK_5D); p1.SetScaleStartTOD(starttod); p1.SetScaleStopTOD(stoptod); p1.AutoScale(data1,ChartObj.AUTOAXES_FAR,ChartObj.AUTOAXES_FAR); p1.SetGraphBorderDiagonal(0.05,0.1,0.95,0.89);
This should give me a trading day from 8pm-2am (it is Asian stock data).
This all worked fine before adjusting the TimeCoordinates
I then set the background, grid, attributes etc. when I call updatedraw i get an exception back in the Main() routine with the following error:
Invalid parameter used. from System.Drawing.
Any ideas?
|
 |
|
wdahl99
10 Posts |
Posted - 08 Jun 2005 : 15:44:07
|
It must have something to do with the 8pm of one day to 2am of another. if i change it to 1am-2am it works fine. |
 |
|
wdahl99
10 Posts |
Posted - 08 Jun 2005 : 15:52:07
|
also tried
long stoptod = 30*60*60*1000;
did not work. Appears I cannot span days. |
 |
|
wdahl99
10 Posts |
Posted - 08 Jun 2005 : 15:53:45
|
i meant long stoptop = 26*60*60*1000; |
 |
|
quinncurtis
1164 Posts |
Posted - 08 Jun 2005 : 16:04:57
|
You are correct, a custom time range cannot cross a day boundary, ie. 8:00PM to 2:00AM. We will have to think about how it can be implemented in future versions of the software, though this would not be for many months. There is no workaround that we can recommend. |
 |
|
wdahl99
10 Posts |
Posted - 08 Jun 2005 : 16:10:00
|
thanks. I actually just added 13 hours to the date so that it is now 9am-3pm.
Wayne |
 |
|
|
Topic  |
|