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#)
 TimeAxis loading delay
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

oliversleep

35 Posts

Posted - 02 Sep 2010 :  08:47:33  Show Profile  Reply with Quote
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  Show Profile  Reply with Quote
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 ?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 02 Sep 2010 :  09:39:10  Show Profile  Reply with Quote
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.
Go to Top of Page

oliversleep

35 Posts

Posted - 02 Sep 2010 :  11:38:51  Show Profile  Reply with Quote
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 ?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 02 Sep 2010 :  12:33:18  Show Profile  Reply with Quote
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);
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  03:56:56  Show Profile  Reply with Quote
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 ?
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  09:25:10  Show Profile  Reply with Quote
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.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 06 Sep 2010 :  09:35:22  Show Profile  Reply with Quote
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.
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  09:41:45  Show Profile  Reply with Quote
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).
Go to Top of Page

quinncurtis

1164 Posts

Posted - 06 Sep 2010 :  09:49:45  Show Profile  Reply with Quote
NewDemosRev2.ElapsedTimeChart has a simple example.
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  10:25:28  Show Profile  Reply with Quote
Oh
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  11:02:57  Show Profile  Reply with Quote
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.
Go to Top of Page

quinncurtis

1164 Posts

Posted - 06 Sep 2010 :  11:10:32  Show Profile  Reply with Quote
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.
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  11:20:51  Show Profile  Reply with Quote
in the 2D Manual ?
It's like in the StackedGraphs example ?
Go to Top of Page

quinncurtis

1164 Posts

Posted - 06 Sep 2010 :  11:34:21  Show Profile  Reply with Quote
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.
Go to Top of Page

oliversleep

35 Posts

Posted - 06 Sep 2010 :  11:40:35  Show Profile  Reply with Quote
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...
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 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