Nevron Forum

Move a real time graph to the "middle"

https://www.nevron.com/Forum/Topic7701.aspx

By Daniel Csimszi - Friday, April 26, 2013

Hi,

I am just wondering if it is possible to combine together a real time graph with a plotting real time graph.

What I mean is to have a normal real time graph, but the user should be able to move the x axis to the "future" so the current point is at the middle of the screen and it is drawing the graph form the middle. after reaching the point in the future where they dragged the graph it should act as normal real time graph again, but since that just work as a plotting one.

Regards
Daniel
By Nevron Support - Friday, April 26, 2013

Hi Daniel,

That will be kind of tricky. In general the control can scroll inside the range specified from Content or custom View (which overrides content). So you cannot force the chart to simply scroll into the future - you need to define where the maximum point in the future is and specify it using a range axis view.
By Daniel Csimszi - Friday, April 26, 2013

Thank you
By Daniel Csimszi - Friday, April 26, 2013

Kind of got on idea with work mates, I can create an invisible graph and add the half of the bartime showing to the current dateTime on that graph.

I think that is kind of an easier solution.

There is just one think with that. I set my scroll bar the way like that:

NDateTimeAxisPagingView pagingView = m_Chart.Axis(StandardAxis.PrimaryX).PagingView as NDateTimeAxisPagingView;
pagingView.Enabled = true;
pagingView.Length = new NDateTimeSpan(interval, NDateTimeUnit.Minute);
pagingView.AutoSmallChange = true;

but it does not seems to be working, I mean If I set it for 15 min it still shows just like 2 minutes of data. Could you tel me what could be the problem for that?

Daniel
By Nevron Support - Monday, April 29, 2013

Hi Daniel,

It maybe that you set the length before the chart has calculated (in which case it will ignore this setting as it still does not have valid ranges). To workaround the problem you can force the chart to recalculate before modifying the paging view:

nChartControl1.Document.Calculate();
nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);

Hope this helps...
By Daniel Csimszi - Tuesday, May 14, 2013

Hi,

I tried what you suggested, unfortunately it does not work.

pagingView.Length = new NDateTimeSpan(interval, NDateTimeUnit.Minute);
pagingView.AutoSmallChange = true;

Using the previous code with the interval is an integer, the paginview unit updates to minute or hour what ever I would like to set it, but it does not updates the number. Added this 3 lines:

nChartControl1.Document.Calculate();
nChartControl1.Document.RecalcLayout(nChartControl1.View.Context);
nChartControl1.Refresh();

But there's no difference.

Regards
Daniel
By Nevron Support - Tuesday, May 14, 2013

Hi Daniel,

Please submit this case to support along with a simple project that replicates the problem.
By Daniel Csimszi - Tuesday, May 14, 2013

Hi,

I am sorry but I did not really get what you meant under: "submit this case to support" (where?, how?).

I did make a small example project, it is even weirder be honest than my real time graph. I used the same code for scrolling and the X axis set-up what I use in my application. If you tell me where to submit I will, or if you could forward it that would be nice too.

--I changed the extension from zip to txt please rewrite it before open it--

Regards
Daniel
By Nevron Support - Tuesday, May 14, 2013

You can submit tickets to the Support Department through the portal: http://support.nevron.com

 

By Daniel Csimszi - Wednesday, May 15, 2013

Just tried to submit a ticket, but unfortunately I do not have any left.

Daniel