Author |
Topic  |
|
bli7167
12 Posts |
Posted - 24 Mar 2006 : 16:27:10
|
Hi,
I build a time coordinate with 5 day week:
TimeCoordinates tcStockPriceHist = new TimeCoordinates(calendarMin, yPriceMin, calendarMax, yPriceMax); tcStockPriceHist.SetWeekType(ChartObj.WEEK_5D);
Later on I built a sample grouptime dateset:
int iWeekMode = ChartObj.WEEK_5D;
for ( i = 1; i < nPoints; ++ i) { cCurrentDate = ChartCalendar.CalendarDaysAdd(cCurrentDate, 1, iWeekMode); xDateValues[i] = (ChartCalendar) cCurrentDate.Clone();
.....
}
But when I render the date using OHLCPlot. There is a small gap for those 2 days (Sat and Sun) between every group of 5 price lines.
Which means that my test data is generated correctly with 5 day week, but the coordinate system still treat it is a 7 day week?
Does this line work?
tcStockPriceHist.SetWeekType(ChartObj.WEEK_5D);
Thanks.
Bing
B7167 |
|
quinncurtis
1164 Posts |
Posted - 24 Mar 2006 : 17:09:31
|
We cannot tell by inspection what is wrong, though we have many, many examples for 5D week scales that do not exhibit the problem you describe.
The FinancialExamples.OHLCChart, FinancialExamples.CandlestickChart, and FinancialExamples.OpeningScreen examples do exactly what you describe, but none show a gap.
Please describe how you can modify the FinancialExamples.OHLCChart to show the problem. If you are unable to do that, then you will need to send the complete source to a simple example program (zip together the complete project directory after deleting the projects \bin and \obj folders) that demonstrates the problem to support@quinn-curtis.com.
|
 |
|
bli7167
12 Posts |
Posted - 27 Mar 2006 : 17:55:59
|
Sorry. But from now on I will keep up with the solution and followup.
After I checked with you example, It seems the difference is that I calculated both min/max date/time and min/max y axis stock values and used you 4 param constructor:
TimeCoordinates tc = new TimeCoordinates(ChartCalendar, double, chartCalendar, double); tc.SetWeekType(ChartObj.WEEK_5D);
The actual dataset is then constructed.
After I switched to first constructed data set, then call the TimeCoordinator with AutoScale, it worked.
tcStockPriceHist.SetWeekType(iWeekMode); tcStockPriceHist.AutoScale(tgdsPrice, ChartObj.AUTOAXES_EXACT, ChartObj.AUTOAXES_EXACT);
Thanks.
Bing
B7167 |
 |
|
|
Topic  |
|
|
|