Author |
Topic  |
|
new
14 Posts |
Posted - 06 Apr 2006 : 08:40:57
|
Hello
I'm tring to plot a graph who is having x-axis as time axis and multiple linear y axis .. for first y axis i was able to set intersection.. but for next y axis i want to set intersection to the left of first axis ... SetAxisIntersection method accepts value as double & x axis scale is ChartCalender. i tried verious possible ways but only end up in subtracting the fix value (in range of 10000) from x-axis min value to set intercept.
So what is proper way for doing it
Thanks in advance
|
|
quinncurtis
1164 Posts |
Posted - 06 Apr 2006 : 09:41:15
|
A time-scale has units of milliseconds. So your value of 10000 mean that you positioned the second y-axis 10000 ms (or 10 seconds) to the left of the first y-axis. The value that you use will obviously be dependent on the range of the time-axis that you are using.
If you can specify the position that you want in terms of a ChartCalendar time, then all you have to do is get the time as a millisecond value.
ChartCalendar timeinterceptvalue; . . // calculate and assign timeinterceptvalue .
yaxis1.AxisIntercept = timeinterceptvalue.GetCalendarMsecs();
|
 |
|
new
14 Posts |
Posted - 06 Apr 2006 : 10:44:59
|
Thanks for help
But it would be better if i can directly retrive the value between consicutive major/minor tick in time(miliseconds) so that i can use this value to place other y axis easily
is there any special method for this?
Thanks |
 |
|
quinncurtis
1164 Posts |
Posted - 06 Apr 2006 : 11:36:42
|
No, we don't have any special routines for that. If you set the time-axis tick mark time base manually using the TimeAxis.AxisTickMarkTimeBase property you already know what the time interval is between major and minor tick marks. If you don't set it directly and have the auto-axis routines set it, you can read the TimeAxis.AxisTickMarkTimeBase property to find out what it is.
For example, a AxisTickMarkTimeBase value of TIMEAXIS_MINUTE5SECOND has one minute between major tick marks, and 5 seconds between minor tick marks.
|
 |
|
new
14 Posts |
Posted - 07 Apr 2006 : 11:03:06
|
Thanks for help
But still i'm facing problem.. I'm reading the values from sql database and plotting them..whenever i change the no of datapoints to plot, my y2,y3 axis get shift from its location.. if no of datapoints increases then two y axis comes closer and reverse if decrease in datapoint.. is there any remedy
another problem i'm seeing is regarding the lable at 1st major tick it is overlapping with 0'th position lable..i tried
x1AxisLab.OverlapLabelMode = ChartObj.OVERLAP_LABEL_DELETE
but no effect (tell me how to attach image file to this message,i've screen shot of my plot)
ok thanks
|
 |
|
quinncurtis
1164 Posts |
Posted - 07 Apr 2006 : 11:53:48
|
The x-intercepts of the y-axes go where you set them. If they are moving closer together as the number of data points increases, then you are not changing the intercepts correctly to account for the increase range of the x-axis. Instead of using the same offset for each axis, as the number of data points increases, you must calculate the offset as a percentage of the x-axis range. If the x-axis has a range of 100 seconds, an offset of 10 seconds (10%) might look OK. If the x-axis has a range of 150 seconds you would need to use an offset of 15 seconds (still 10%) to maintain the same relative position to the x-axis. Its pretty simple programming.
You can send a picture to support@quinn-curtis.com. You should also create a simple example program that we can run, that demonstrates the problem, and send us the complete source to the example as a zipped project.
|
 |
|
|
Topic  |
|