Y-axis not redrawing

jimctr

Well-known member
Joined
Dec 1, 2011
Messages
52
Programming Experience
Beginner
I have a series of charts which I generate dynamically, and I am able to drill down and drill back up. Instead of disposing of charts and then recreating them (Chart1 = New Chart()) as this created all sorts of problems for me (i.e., broken object references), I create all charts once at the beginning and then as I drill up and down, I hide and then make visible the Charts as I need them and then refresh them with new data. The problem with this approach is that the Y-axis does not appear to regenerate based upon the new Y values and the waveform will appear to clip if the range generated during the first encounter is smaller than the range which is required the second time around. YAxis is set to auto-range but the auto-range does not appear to work. Note that although I do not dispose of the Chart, I do clear all collections prior to assigning new values.
 
I think what was tripping me up here was that I am using a dual Y-axis system, primary and secondary. On one axis I was expecting the scale to auto-generate while on the other axis, I was fixing the min and max values. Maybe VB.net has a problem with this schitzophrinic approach. I worked around the issue by establishing min max values for both axes.
 
Back
Top