Jump to content
Software FX Community

Linechart: can you make color a of point and line different


miantosca

Recommended Posts

I am trying ot hightlight points on a line chart by changing their color but it is having an undesired side effect - it also colors the line segment after the point the same color - is there a way for me to change the color of certain points but have all the line segments the same color?

thanksMichael

Link to comment
Share on other sites

Definetly!

 // Instruct Chart FX to use the border color for the lines. By default, the Series color is used.

 chart1.AllSeries.Border.UseForLines = true;  chart1.AllSeries.Border.Effect = BorderEffect.None;

// Define the border (line) color for each series   chart1.Series[0].Border.Color = chart1.Series[0].Color;  chart1.Series[1].Border.Color = chart1.Series[1].Color;

// Now you can change the Per-Point color to affect the marker color only  chart1.Points[0,1].Color = Color.Red;

Link to comment
Share on other sites

I was wondering if anyone had any insight on this post - see attached sample image - you can see the line after the black points is black - but I want it to be blue like the rest of the chart - and only change the color of the point to black.

thanksMichael

Link to comment
Share on other sites

Yes. This is available in 6.2 but your post is in the Chart FX for VS 2005 Forum :-( 

This is the equivalent Chart FX 6.2 Code:

chart.TypeMask &= ~ChartType.ColorLine;chart.BorderEffect = BorderEffect.None;

// Define the border (line) color for each series chart.Series[0].BorderColor = chart.Series[0].Color;chart.Series[1].BorderColor = chart.Series[1].Color;

// Now you can change the Per-Point color to affect the marker color onlychart.Point[0,1].Color = Color.Red;

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...