Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Behavior: AxisCustomDivisions

It appears that the grid lines for custom divisions are drawn for an axis even if axis.Visible = false. I noted this behavior specifically for the Y axes on a ScatterPlot (.NET).
Furthermore, the custom division grid lines persist even after calling axis.CustomDivisions.Clear() if the call occurs while axis.Visible = false.
I had to change the order of these statements in order to actually clear the plot gridlines.
 
Does not work:
 
axis.CustomDivisions.Clear();
axis.Visible = true;
 
Does work:
 
axis.Visible = true;
axis.CustomDivisions.Clear();
 
This seems very strange. I would expect no gridlines to be drawn for CustomDivisions on a non-visible axis. Is this a bug?
 
 
0 Kudos
Message 1 of 2
(3,152 Views)
Hi Adam,

It appears you found a bug with regards to calling the CustomDivisions.Clear method after you set the axes visible property false. It should clear those grid lines but for some reaons it does not.  This is actually the opposite of what you posted so i don't know if you made a mistake. Basically

Does not work

scatterGraph1.XAxes[0].Visible = false;
scatterGraph1.XAxes[0].CustomDivisions.Clear();

Does work
scatterGraph1.XAxes[0].CustomDivisions.Clear();
scatterGraph1.XAxes[0].Visible = false;

As far as the gridlines still being there when you just call scatterGraph1.XAxes[0].Visible = false;, I think that can be argued both ways. Sometimes people might want to make their axes not visible but still show their gridlines.

The bug ID that was filed for the custom divisions issue is 4CC9SF0F for your reference.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 2 of 2
(3,137 Views)