Author |
Topic  |
|
carlao
54 Posts |
Posted - 24 Mar 2005 : 14:31:58
|
I want to plot 5 chart lines where 3 are temperature and 2 are rotation. How do I can plot all the 5 lines but using only 2 Y axis, that is, one for temperature and the other for rotation. I would like to have one as default (left) and the other at right side (x max). I am usigin GroupPlotDataset to store these 2 groups. So, I have an array of 2 GroupPlotDataset. The problem is, I use one ptransform for each line os one ptransform for each group? When I do a horiz scroll need I update each line or I can update each GroupPlotDataset that all works fine? I was reviewing some examples but I found Multiplot with one Y axis and plot with multiaxis, but not a GroupPlot with multiaxis. Thanks.
carlao.
|
|
quinncurtis
1164 Posts |
Posted - 24 Mar 2005 : 21:52:49
|
I do not understand your question: "When I do a horiz scroll need I update each line or I can update each GroupPlotDataset that all works fine?"
You do not update the lines, or the datasets when you do a scroll. You change the starting and ending position of each ptranforms x-axis scale, in your example there are two of them, and the properties of the related axes.
The example program OHLCFinPlot that I have referenced before is almost exactly what you want. It has two ptransforms, two y-axes, a scrollbar, one group plot and one simple line plot. Study that example.
|
 |
|
carlao
54 Posts |
Posted - 25 Mar 2005 : 12:43:41
|
Yes, I spent many hours but I had success creating this chart. But I have a problem yet. The label in the right Y axis is very close the Y axis and it is overriden the Y tick labels. I tried to use AxisTitle.MoveRel method but the Y label string doesn move. Any idea?
|
 |
|
quinncurtis
1164 Posts |
Posted - 25 Mar 2005 : 15:07:04
|
I assume you are asking about a title you have created for the right y-axis. How does your code differ from our examples that have right axis titles ? For example see Chart Of the Week picture:
http://www.quinn-curtis.com/chartOfTheWeek11-19-03.jpg
which is our QCChart2D example program ChartOftheWeek11-19-03.
|
 |
|
carlao
54 Posts |
Posted - 31 Mar 2005 : 05:01:24
|
Relate to this topic now I need to create a multiaxis, but using a calendar in x axis. When I have 2 y linear axis is easy to intercept x calendar axis because I can use GetAxisMin and GetAxisMax methods. But I need to have 6 y axis. The problem is that x axis can not be less then zero. That way, how can I intercept all the y axis (linear) using x calendar axis, in the same way when I have y and x as linear axis? |
 |
|
quinncurtis
1164 Posts |
Posted - 31 Mar 2005 : 09:13:48
|
The only way you are at 0 for a time/date based axis is if you are working with a date that starts at 1/1/1, or around the time Caesar Augustus ruled in Rome.
Have the time/date coordinate system, and x-axis starting date, reside in the current era, even if you are only interested in the time-of-day portion of the date. That will give you plenty of room for y-axes to the left of the coordinate system. |
 |
|
carlao
54 Posts |
Posted - 31 Mar 2005 : 10:17:22
|
Let me see if I understand what you are saying. Suppose that I define a range of 6AM to 6PM. As I said, I need 6 Y axis. That way, I could intercept X axis in 6AM,7AM,8AM,9AM,10AM and 6PM where 10AM will have the first Y axis (in the same way as linear x axis). Also, the lines will be drawed between 10AM and 6PM area. See that I also need that this chart be scrollable. So, I think that I will need to use the UpdateXScale method used in the linear examples, but now considering time scale. Is it feaseable? If I set x start and stop between 6AM and 6PM, how the lines will be drawed between 10PM and 6PM? By the other hand, if I set x start and stop to 10PM and 6PM to have the lines inside this range, I think that will not be possible locate the Y axis from 6AM to 10PM because it will be out the min value. Is it correct? |
 |
|
quinncurtis
1164 Posts |
Posted - 31 Mar 2005 : 10:35:20
|
If the data is in the range 10AM to 6PM, then you would define the x-scale of all the coordinate systems using that range. You MUST use current era dates though. 10AM would actually be something like Jaunuary 1, 2004 10:00:00, NOT Januray 1, 01, 10:00:00.
If your y-axes are at 6AM, 7AM, 8AM, 9AM and 10AM, then you would set the respective x-axis intercept property of the associated y-axis for each of those values.
If you want to OFFSET a group of y-axes with respect to the current scale you could use code something like:
// Assumes that the pTransform1.ScaleMinX value is same for the x-scale of each coordinate system
yAxis1.AxisIntercept = pTransform1.ScaleMinX ;
yAxis2.AxisIntercept = pTransform1.ScaleMinX - ChartCalendar.GetCalendarWidthValue(ChartObj.HOUR,1.0);
yAxis3.AxisIntercept = pTransform1.ScaleMinX - ChartCalendar.GetCalendarWidthValue(ChartObj.HOUR,2.0);
yAxis4.AxisIntercept = pTransform1.ScaleMinX - ChartCalendar.GetCalendarWidthValue(ChartObj.HOUR,3.0);
If you would like a custom example written to your specification you should contact Quinn-Curtis programming services, see: http://www.quinn-curtis.com/Services.htm. |
 |
|
|
Topic  |
|
|
|