I am using ZedGraph to show a workprocess. For this process I also have to show the range of a temperature. It should look kind of like this ZedGraph example.
For my application I need the range to be shown in the whole diagram even after I dragged the shown area to the left or right with the mouse wheel. If I just change the startpoint and the width of the box it is showed outside the axis like this which is not what I´m looking for.
Is there a way to show the range box always inside the border of the graph even after scrolling in the grapharea by using the mousewheel?
Use MouseMoveEvent and ZoomEvent where you set the start of
BoxObj'sXaxis toZG.GraphPane.XAxis.Scale.Minand the width toZG.GraphPane.XAxis.Scale.Max - ZG.GraphPane.XAxis.Scale.Min.On MouseMoveEvent you have to put this code inside
if (e.Button == MouseButtons.Middle || (e.Button == MouseButtons.Left && (ModifierKeys & Keys.Control) == Keys.Control))to do this only if panning is started. Return false to allow pan function to still work.