In following my question “ZedGraph custom graph” I have chart with every second inserting of datas, now I have other questions:
-
How to smoothly move down Y2Axis (DateTime type) with a chart line and show in chart always only last 30 minutes?
-
How to format Y2Axis labels “HH:mm” to get 10:05, 10:10, 10:15, …, 10:30?
Thanks for help!
UPD1:
Thanks kmp! I try your code – its good, but with issue: when I started I see this:

When after few minutes I see this picture:

I have a “compression” of chart area, but I want statically show always last 30 minute and slowly move down old datas, without of scaling or “packing” chart with axis. I hope you understand me.
UPD2:
Yet another issue – labels of Y2Axis haven’t fixed values. For example now:

And after few seconds:

Starting with the easiest – formatting the labels can be done like so:
One way you could do this (and it feels a bit flaky but I will let you decide) is to simply remove the points from the curve once they go beyond your threshold (in this case more than 30 minutes). That way when the chart redraws the axis will update accordingly.
I feel like taking the scale min value might be a better approach than this, but failing that you can simply maintain a queue as you add the points like so and then remove them when they go beyond your threshold: