Author |
Topic  |
oliversleep
35 Posts |
Posted - 02 Sep 2010 : 08:47:33
|
Hi,
When I'm loading multi-windows with 2D graph. My soft freeze for long long time. After analyze, the delay is in TimeAxis constructor :
chartView.DeleteChartObject(_xTimeAxis);
_xTimeAxis = new TimeAxis(_pTransform, ChartObj.X_AXIS);
_xTimeAxis.SetColor(_axisColor);
chartView.AddChartObject(_xTimeAxis);
And specially in my AddChartObject function.
Do you have an idea about this problem ?
Is there a time limit
|
|
oliversleep
35 Posts |
Posted - 02 Sep 2010 : 08:52:30
|
I found a solution, in using :
_xTimeAxis = new ElapsedTimeAxis(_pTransform, ChartObj.X_AXIS);
_xTimeAxis.SetAxisIntercept(0);
_xTimeAxis.SetColor(_axisColor);
chartView.AddChartObject(_xTimeAxis);
Is it the same one ? |
 |
|
quinncurtis
1164 Posts |
Posted - 02 Sep 2010 : 09:39:10
|
Sorry, but we have no idea what the problem could be. If you can supply us with a project which reproduces the problem we will look at it.
A TimeAxis is completely different than an ElapsedTimeAxis. They require different coordinate systems. If all you need is continuous elapsed time, and not an absolute time/date, then use elapsed time; it is simpler in implementation and faster. |
 |
|
oliversleep
35 Posts |
Posted - 02 Sep 2010 : 11:38:51
|
We need an X axis from 0 to x Seconds (in milliseconds) with a special display : H:MM:SS,MS.
And to add points in this graph, we give the time of the plot (tick) and the value (double).
I'm sorry, I can't give you a project of my previous problem, because I'm continuing to develop my graph with the ElapsedTimeAxis.
Do you think if the ElapsedTimeAxis is OK for what we would like ? |
 |
|
quinncurtis
1164 Posts |
Posted - 02 Sep 2010 : 12:33:18
|
If your program is currently working with elapsed time I can't see any reason you shouldn't continue to use it.
The ElapsedTimeAxisLabels class does not have a custom string option. So when you zoom, the axis labels will auto-calculate the decimal precision based on the current scale of the graph. You will have to subclass the ChartZoom class to force 2 decimal precision though. This would work. The value of the axis labels object, xAxisLab, is global to the entire class, so that it can be accessed inside the CustomZoom class using a reference to the class.
ElapsedTimeAxisLabels xAxisLab;
private class CustomZoom : ChartZoom
{
ElapsedTimeChart comp = null;
public CustomZoom(ElapsedTimeChart component, PhysicalCoordinates transform, bool brescale)
:
base(component, transform, brescale)
{
comp = component;
}
public override void OnMouseDown(MouseEventArgs mouseevent)
{
comp.xAxisLab.ChartObjEnable = ChartObj.OBJECT_DISABLE;
base.OnMouseDown(mouseevent);
}
public override void OnMouseUp(MouseEventArgs mouseevent)
{
base.OnMouseUp(mouseevent);
comp.xAxisLab.AxisLabelsDecimalPos = 2;
comp.xAxisLab.ChartObjEnable = ChartObj.OBJECT_ENABLE;
comp.Invalidate();
}
}
.
.
.
xAxisLab = new ElapsedTimeAxisLabels(xAxis);
xAxisLab.SetTextFont(theFont);
xAxisLab.AxisLabelsFormat = ChartObj.TIMEDATEFORMAT_24HMS;
xAxisLab.AxisLabelsDecimalPos = 2;
chartVu.AddChartObject(xAxisLab);
.
.
.
CustomZoom zoomObj = new CustomZoom(this, pTransform1, true);
zoomObj.SetZoomYRoundMode(ChartObj.AUTOAXES_FAR);
zoomObj.SetEnable(true);
zoomObj.SetZoomStackEnable(true);
chartVu.SetCurrentMouseListener(zoomObj);
|
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 03:56:56
|
My application is running with the ElapsedTimeCoordinates, but I don't arrive to implement a MoveCoordinates or ChartZoom object on my curves. When I click on my graph and move my mouse, the area is designed but no zoom appears. (the same for the MoveCoordinates object). Instead, with a TimeCoordinates, it's working very well, but when I use a TimeAxis and TimeAxisLabels it's freezing my graph loader.
And if I use a ElapsedTimeAxis and ElapsedTimeAxisLabel with TimeCoordinates, I don't see any value under my X axis.
Do you have any idea how to use the MoveCoordinates and ChartZoom object under the ElapsedTimeCoordinates ? |
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 09:25:10
|
It's magic, now Zoom and Move are running with ElapsedTimeCoordinates .
My curves are OK, but now, my X axis doesn't scaling with the graph (when zooming or moving).
I'm currently trying to update my axe scale. |
 |
|
quinncurtis
1164 Posts |
Posted - 06 Sep 2010 : 09:35:22
|
You will need to send us (support@quinn-curtis.com) an example project which demonstrates the problem if you unable to get it to work.
|
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 09:41:45
|
Tks for your reply, but I'm trying to resolve it alone. I hope it's simple.
Is there any example of ElapsedTimeCoordinates with the X scale ? I only find TimeCoordinates demo (I think it's the same). |
 |
|
quinncurtis
1164 Posts |
Posted - 06 Sep 2010 : 09:49:45
|
NewDemosRev2.ElapsedTimeChart has a simple example. |
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 10:25:28
|
Oh  |
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 11:02:57
|
I think it's not possible to add multi curves on the same ElapsedTimeCoordinates, but with different Y scales.
I'm using a multi ElapsedTimeCoordinates manager to display what I would like. |
 |
|
quinncurtis
1164 Posts |
Posted - 06 Sep 2010 : 11:10:32
|
Yes, it is possible to display multiple curves with different y-axis scales. You do that by creating multiple overlapping coordinate systems, as seen in the examples. See FAQ #2 in the last chapter of the manual. |
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 11:20:51
|
in the 2D Manual ? It's like in the StackedGraphs example ? |
 |
|
quinncurtis
1164 Posts |
Posted - 06 Sep 2010 : 11:34:21
|
Yes, the last chapter of the 2D manual is titled "Frequently Asked Questions (FAQs)".
FAQ #2 describes how to create charts like MultipleAxes.MultiAxesChart.
Do you want to create a chart like StackedGraphs, but with elapsed time coordinates? It should be trivial to convert that example to ElapsedTimeCoordinates. What problem do you have when you do that? Describe in detail.
|
 |
|
oliversleep
35 Posts |
Posted - 06 Sep 2010 : 11:40:35
|
I'm currently trying to create a graph with multiple curves, with multiple Y scales. The X axes is the same Time display (like 00:00:00,0)
I have to implement a MoveCoordinates and ChartZoom (with differents buttons).
For the moment, I have the curves, I can zoom and move, but when I move, the X axes label is not totally correct. But when I'm zooming, the scale doesn't change... To display my Y axes (for each curve) I create a CartesianCoordinates wich contains only Y axes.
So I have a main ElapsedTimeCoordinates, and for each curve I'm using a ElapsedTimeCoordinates to change each scale. I think it's not the good method to obtain my result.
I hope you understand what I mean... |
 |
|
Topic  |
|