0
votes

I'm stuck on two problems involving a Zedgraph.

I need to make it behave like a plotter. I have achieved this by setting the min and max value on the X scale when I need to update (the values are already in the graph, its a simulation).

Now the problem is when I activate the real time functionality sometimes(most of the time actually) the last label isn't drawn, I suspect because it doesn't fit in the pane. Is there any way to force the last label to draw (at the red circle, see image)?

Missing label

On to my second problem; Sometimes when the min and max scale are updated, the label lines(the lines in the yellow box, see image) shift a little to the right or left, same thing happens when I pan through the graph. This also causes the gridlines (dotted lines in the graph) to move, I would like to have those lines fixed on the same position.

Hope to find an answer, else I think I'll just use another graph library. Maybe any of you could point me to a good alternative with support for this kind of functionality. Though I absolutely love the zoom/pan features of zedGraph, not to mention the usefull functions in the context menu.

1

1 Answers

0
votes

I have found the solution, the problems were caused by the same issue. The date values I was using to set the scale contained miliseconds, this caused the scale to move just a little causing the label to disappear of the pane. I removed the miliseconds from the timestamp and now the graph is 'stable', meaning the scales don't move. And the last label is always drawn.