Jump to content
Software FX Community

How can I change the Z-index of AxisSection of X and Y?


dolgorae

Recommended Posts

Hello.

There is an AxisSection on each X and Y axis.

The code is,

  // Axis X : 8~10 Area

  ChartFX.WinForms.AxisSection XSection = new ChartFX.WinForms.AxisSection(8, 10, Color.LightBlue);

  chart1.AxisX.Sections.Add(XSection);

  // Axis Y : 50+-1 Red Line

ChartFX.WinForms.AxisSection YSection = new ChartFX.WinForms.AxisSection(50+1, 50-1, Color.Red);

  chart1.AxisY.Sections.Add(YSection);

   

I expected that the red line would be shown over the the lightblue area.

However, the red line from 8~10 area is always behind of the lightblue area.

What I was wondering is, how can I change the Z index priority of the AxisSections of X and Y axis?

 

I want to show the Y-AxisSection over the X-AxisSection.

I need help.

Thank you..!

Link to comment
Share on other sites

Hi dolgorae

Unfortunately, you cannot change the Axis Z-Index, this is a restriction by default.  I found a workaround for this issue, please check the following code:

ChartFX.WinForms.AxisSection YSection = new ChartFX.WinForms.AxisSection(50 + 1, 50 - 10, Color.FromArgb(128, Color.Red));ChartFX.WinForms.AxisSection XSection = new ChartFX.WinForms.AxisSection(8, 10, Color.FromArgb(70, Color.Blue));

I hope it helps.

--Pipon

 

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.

×
×
  • Create New...