Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems changing the ScaleType of X-axis of ScatterGraph

Hi,

There are problems changing the ScaleType of X-axis of ScatterGraph. I am using MS Enterprise 8.0.11.236

Here is the the code I used to fill the plot:

System.Random rnd = new Random( ( int ) System.DateTime.Now.Ticks );
int size = 100;
double[] buffer0 = new double[size];
double[] buffer1 = new double[size];
for ( int i=0; i<size; ++i )
{
    buffer0[i] = i + 1;
    buffer1[i] = rnd.NextDouble() * 100 - 50;
}
this.scatterPlot1.PlotXY( buffer0, buffer1 );
xAxis1.Range = new NationalInstruments.UI.Range( 1, xAxis1.Range.Maximum ); // without changing a range everything works fine...

... and here is the code I used to change the ScaleType:

this.xAxis1.ScaleType = this.xAxis1.ScaleType == NationalInstruments.UI.ScaleType.Linear ? NationalInstruments.UI.ScaleType.Logarithmic : NationalInstruments.UI.ScaleType.Linear;

To see the update graph, I need to resize the Form with ScatterGraph control. Is there a way how to update the graph without resizing?
There is a testing application in attachment.
0 Kudos
Message 1 of 1
(3,109 Views)