Jump to content
Software FX Community

Start of period - End of period

User (Legacy)

Recommended Posts

Using an XY line chart with a date X-Axis,  I am trying to set the 

individual color of specific points and line segments in a Line chart. The

problem is that I wish to change the color for a line segment and for the

marker at the end of the segment. By setting the color on a point, the chart

draws the line segment following the marker, not the line segment in

preceding the marker. Here is a simple example.

I am creating a chart with 3 points

X = 1/1/2000 12:00 am Y = 5 Color = blue

X = 1/1/2000 1:00 am Y = 4 Color = red

X = 1/1/2000 2:00 am Y = 6 Color = blue

These points are to be read as "end of period". Therefore, I want the symbol

at 1:00 am and the line segment from 12:00 am to 1:00 am to be red while the

other markers and line segments are blue. When I set the color for the point

at X=1:00 am to red, the wrong line segment is colored red (1:00 am to 2:00

am). How can I change this behavior?

Link to comment
Share on other sites

You can have independent colors for the line and the markers by doing:

Chart FX for Visual Studio 2005:

chart1.AllSeries.Border.UseForLines = true;

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

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

chart1.Points[1].Color = Color.Green;

chart1.Points[2].Color = Color.Blue;

chart1.Points[0].Border.Color = Color.Magenta;

chart1.Points[1].Border.Color = Color.Yellow;

chart1.Points[2].Border.Color = Color.Orange;

Chart FX 6.2:

chart1.TypeMask &= ~ChartType.ColorLine;

chart1.BorderEffect = BorderEffect.None;

chart1.Point[0].Color = Color.Red;

chart1.Point[1].Color = Color.Green;

chart1.Point[2].Color = Color.Blue;

chart1.Point[0].BorderColor = Color.Magenta;

chart1.Point[1].BorderColor = Color.Yellow;

chart1.Point[2].BorderColor = Color.Orange;


Francisco Padron


Link to comment
Share on other sites


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

  • Create New...