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
 QCChart3D 3D Charting Tools for .Net (VB and C#)
 Showing years labels in a wide date range
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

guyguy2003

10 Posts

Posted - 28 Apr 2008 :  23:08:50  Show Profile  Reply with Quote
Dear Sir/Madam

I have a problem with the Time Plot, that I hope you guys can help me solve. When the data I am showing is not very wide (say 10 years) It shows the years on the X axis with no problems. However in the applications I am writing the data range can be for 100 years, in which case there are no labels on the X Axis at all until I zoom in.
Is there a way to show labels with say 10 year gaps in case the date range is so wide?
I am adding the code I used to put the labels on the x axis:

xAxis = New TimeAxis(pTransform)

chartVu.AddChartObject(xAxis)

Dim xaxistitle As New AxisTitle(xAxis, axisTitleFont, "")
chartVu.AddChartObject(xaxistitle)

Dim xAxisLab As New TimeAxisLabels(xAxis)
xAxisLab.SetTextFont(theFont)

xAxisLab.SetAxisLabelsFormat(ChartObj.TIMEDATEFORMAT_Y)

chartVu.AddChartObject(xAxisLab)

Cheers

Guy Rotenberg
NRW Queensland, Australia

quinncurtis

1531 Posts

Posted - 29 Apr 2008 :  10:12:01  Show Profile  Reply with Quote
The auto-axis routines don't go out that far. We will have to add that range in a subsequent version. In the meantime you can just set a couple of axis properties, in bold.

xAxis = New TimeAxis(pTransform)
    xAxis.AxisMinorNthTick = 1
    xAxis.AxisMinorTicksPerMajor = 10
chartVu.AddChartObject(xAxis)


This will draw the time axis OK initially. But if you are zooming the axis, starting at this point, when you return to the original scale the axis will revert to its old form. We will have to fix the auto-scale routine internally before zooming will work across such a wide range. Contact support@quinn-curtis.com in couple of days for an updated DLL.
Go to Top of Page

guyguy2003

10 Posts

Posted - 29 Apr 2008 :  21:45:46  Show Profile  Reply with Quote
Thanks guys!

your solution worked ok without the zoom (I got 00, 10, 20 for years - yy format) but I have noticed today that zooming out does change the type of labels you have - I had set yy format for years and when zooming out even when i have only 2 years data it shows as m/yyyy when zooming back out - is that what you are trying to fix?

Cheers

Guy
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