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#)
 xAxis label and legend
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

oliversleep

35 Posts

Posted - 01 Sep 2010 :  08:32:06  Show Profile  Reply with Quote
Hi,

I'm trying to implement an xAxisLabel element on my graph.
I'm using a TimeCoordinates element, and I would like to display these informations :
H:MM:SS.MS

here is my code :

_xTimeAxisLabel = new TimeAxisLabels(_xTimeAxis);
_xTimeAxisLabel.SetTextFont(_fontArial10);
_xTimeAxisLabel.SetColor(_axisColor);
_xTimeAxisLabel.DateCrossoverMode = ChartObj.NO_DATECROSSOVER;
_xTimeAxisLabel.SetCustomTimeFormatString("H:MM:ss.ff");
chartView.AddChartObject(_xTimeAxisLabel);


It's seems working, but when I zoom, the axe zoom but I don't show
milliseconds (for example).

And also, I would like to display a legend at xScaleMax with the unit of my axe. Am I forced to use a stringLabel (with setLocation function) or is there another solution ?


Thanks a lot

quinncurtis

1164 Posts

Posted - 01 Sep 2010 :  10:31:07  Show Profile  Reply with Quote
We cannot reproduce the zooming problem you describe. If you set a custom axis labels format, as you show, then the axis labels should display using the custom axis labels format, regardless of the zoom level. If you use one of the standard axis labels formats xAxisLabels.SetAxisLabelsFormat(ChartObj.TIMEDATEFORMAT_24HMSDD), the axis labels will auto-format, based on the displayed time scale.

See if you can reproduce the problem using the ZoomExamples.CalendarZoom example program. We were not able to. If you can reproduce the problem, send your version of the CalendarZoom source file to support@quinn-curtis.com.

You might be able to use the AxisTitle class to display your units string. It will display the string centered, underneath the axis labels; the centering position cannot be changed. Or you can use one of the text classes: ChartText, StringLabel, NumericLabel, or TimeLabel and explicitly position the string.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 01 Sep 2010 :  12:39:47  Show Profile  Reply with Quote
If you don't want a label to move when you zoom, you should position it in normalized graph coordinates (NORM_GRAPH_POS). If you position using the default physical coordinates, it will change position, and most likely move off screen when you zoom.

double xpos = 0.9; // Graph normalized position
double ypos = 0.85; // Graph normalized position
ChartText caption1960 = new ChartText(pTransform1,captionFont,string1960,
xpos, ypos, ChartObj.NORM_GRAPH_POS);
Go to Top of Page

oliversleep

35 Posts

Posted - 02 Sep 2010 :  08:39:05  Show Profile  Reply with Quote
Thanks a lot for your answer.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 02 Sep 2010 :  09:41:19  Show Profile  Reply with Quote
What did you decide about the the custom axis labels changing format when you zoom?
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