Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 miltiline plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wdahl99

10 Posts

Posted - 07 Jun 2005 :  12:21:44  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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 ?



Go to Top of Page

wdahl99

10 Posts

Posted - 08 Jun 2005 :  14:06:17  Show Profile  Reply with Quote
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
Go to Top of Page

quinncurtis

1164 Posts

Posted - 08 Jun 2005 :  14:44:44  Show Profile  Reply with Quote
The QCChart2DNetManual.pdf user manual, Chapter 4, Scaling and Coordinate Systems, discusses this. See the ChartTabDemo.OHLCFinPlot example.
Go to Top of Page

wdahl99

10 Posts

Posted - 08 Jun 2005 :  15:39:56  Show Profile  Reply with Quote
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?
Go to Top of Page

wdahl99

10 Posts

Posted - 08 Jun 2005 :  15:44:07  Show Profile  Reply with Quote
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.
Go to Top of Page

wdahl99

10 Posts

Posted - 08 Jun 2005 :  15:52:07  Show Profile  Reply with Quote
also tried

long stoptod = 30*60*60*1000;

did not work. Appears I cannot span days.
Go to Top of Page

wdahl99

10 Posts

Posted - 08 Jun 2005 :  15:53:45  Show Profile  Reply with Quote
i meant
long stoptop = 26*60*60*1000;
Go to Top of Page

quinncurtis

1164 Posts

Posted - 08 Jun 2005 :  16:04:57  Show Profile  Reply with Quote
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.
Go to Top of Page

wdahl99

10 Posts

Posted - 08 Jun 2005 :  16:10:00  Show Profile  Reply with Quote
thanks. I actually just added 13 hours to the date so that it is now 9am-3pm.

Wayne
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07