Jump to content
Software FX Community

Marker color and border color?


micjohnson

Recommended Posts

Hello!  Newbie here.  I am plotting a scatter chart, where I want the marker's color and border color to indicate two different things (ie, I might want the marker "interior" color to be green, but the border color to be red).  However, changing the border color in the code does not seem to have any effect -- it appears that the border color is controlled by the marker "interior" color.  For example, the following code should give me a marker with a green interior fill and a red border, but it's just all green (in fact, the border is a slightly darker shade of green than the interior green):

 

chart.Points[x, y].Color = Color.Green;

chart.Points[x, y].Border.Color = Color.Red;

chart.Points[x, y].Border.Visible = true;

 

Any suggestions on how to control the marker border color?

Thanks in advance,

Mike Johnson

 

Link to comment
Share on other sites

Hello and welcome to the Software FX forums!

The markers have an Effect property, which is set to Darker by default. That makes the border a darker shade of the point color. Try setting the effect to None, as below (I increased the size of it all for visibility).

chart1.Points[0, 0].MarkerSize = 20;

chart1.Points[0, 0].Color = Color.Green;

chart1.Points[0, 0].Border.Color = Color.Red;

chart1.Points[0, 0].Border.Effect = BorderEffect.None;

chart1.Points[0, 0].Border.Width = 3;

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