Jump to content

Multiple scales overlapping on graph


Recommended Posts


I have this intermittent problem with multiple axes on a waveform graph control.

I have a graph where I'm displaying multiple, optional graphs with different units (voltage, current, torque, angular position). I coded up a boolean selector array to allow the user to select which graphs they wanted to display (some 3 whole months before the feature was introduced in 2011 (this is 2010 SP1 btw)). I process this array when it changes and make unselected graphs transparent.

At the same time, I analyze which units are being displayed and if, for example, there are no torque signals, I turn off the torque axis (via YScale.Visible) to make more room on the graph.

My problem is that when this is done dynamically, sometimes two axes will wind up being drawn overlapping each other. The units for one overwriting units of the other and/or one of the scales being pushed much further off to the side than necessary eating up a lot of graph space.

The only way I've found to fix this (if in the dev environment) is to stop the program, right click the scale and tell it to "swap sides", then tell it to swap sides again. (I might should mention I have two scales on the left and two on the right). This will fix it every time. However, I've been unable to locate a property that replicates this behavior or even just gives me a 'redraw' type command to recompute the axis display positions.

Oh, also the Yscale.Visible and coloring the unselected graphs transparent is done with DeferPanelUpdates turned on.

Can anyone think of a way to fix this short of manually playing around with Bounds & Position settings?

Best Regards,


Link to comment
  • 2 months later...

I have no answers but run into this all the time. Help us, please!

I have found that making sure the background of the labels and scale numbers are not transparent seems to help. It also seems to help if I initialize the scales with the same number of digits in width. Another one is to make sure the plot area is small enough to allow all the scales to appear without re-sizing.

None of those work reliably or very well...I hope somebody has a solution. Did you post this on the dark side?


Edited by jbjorlie
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.