Jump to content
Software FX Community

Invert Axis Not Updating Correctly In All Circumstances


MikeK
 Share

Recommended Posts

I have a line chart that has multiple y axes.  If I create a new y axis and add it to chart.YAxes and it has the Inverted property set to true it does not show up in the chart as inverted.  Below is a short exampe.

Does not work:

			[color= #2b91af]Axis[/color] axis = [color= blue]new[/color] [color= #2b91af]Axis[/color] ();			axis.Inverted = [color= blue]true[/color];			chart1.AxesY.Add (axis);

It does work on load if I write "chart1.YAxis.Inverted = true;" but this does not fit my needs as I need multiple axes.

 Any help is appreciated.

Link to comment
Share on other sites

I am assigning the new Y axis to a series but I it is first given the property of inverted before the axis is assigned.  So to complete my code snippet provided above:

 Axis axis = new Axis ();

axis.Inverted = true;

chart1.AxesY.Add (axis);

SeriesAttribues sa = new SeriesAttributes ();

sa.AxisY = axis;

I have found a work around, but I would prefer if I could remove the hack from my code.  Right after the previous segment of code I have:

axis.Inverted = axis.Inverted;

 Not clean, but it gets the chart to load correctly.

 

Thanks,

 Michael

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

 Share

×
×
  • Create New...