Jump to content
Software FX Community

Setting visibility of lines in chart


Mick

Recommended Posts

How do I change the visibility of the axis "tick lines" that go through the background of the chart?

I've tried the following:

  Chart myChart = new Chart();

  // None of these remove the vertical lines
  myChart.AxisX.Line.Visibility = Visibility.Collapsed;
  myChart.AxisX.Line.Stroke = Brushes.Transparent;
  myChart.AxisX.Line.StrokeThickness = 0;
 

Here is a picture of part of what I want: I want to collapse the vertical lines (Chart 1), and to keep the labels along the bottom (Chart 2).

Posted Image

How do I do this?

Thank you,

Mick

 

Link to comment
Share on other sites

Hi Mick,

Yes, I removed the post since I put the wrong snippet:

the correct one is chart1.AxisY.Grids.Major.Visibility = Visibility.Collapsed; this because I set the strokeThickness instead.

I was about to repost it, but it seems that the other snippet all ready helped.

 

Well im glad your code is now working. If you need further assistance, just let us know.

Im always glad to help. 

 

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