Jump to content
Software FX Community

Line chart: Line color between 2 points


User (Legacy)

Recommended Posts

Yes.

The default is to draw the lines and the points using the same color, howver

this can be changed by doing:

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

chart.AllSeries.Border.UseForLines = true;

When you do this, the Border color, not the Series color is used to draw the

line. After this you can control the color of the line independent from the

color of the point by doing:

chart1.Series[0].Border.Color = Color.Yellow;

chart1.Series[1].Border.Color = Color.Blue;

--

Francisco Padron

www.chartfx.com

Link to comment
Share on other sites

I have done exactly as suggested and it did work but it didn´t what I really

wanted it to do. The line had the Point Border Color but at the same time

the Point had a border of 1px (which I didn´t want).

So, let me just say what I want, maybe you´ll be able to suggest a proper

way to handle the problem:

- I want to be able to use the Point color as well as the Point Border Color

without affecting the color of the line between 2 points

- I want to be able to access the lines between 2 points and change their

style and color as I wish without having to change the Point Color or

Point Border Color

Hope that this makes my question more clear.

Thanks.

Mihai

"Software FX" <noreply@softwarefx.com> wrote in message

news:zlzuYFzPHHA.2276@webserver3.softwarefx.com...

> Yes.

>

> The default is to draw the lines and the points using the same color,

> howver this can be changed by doing:

>

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

> chart.AllSeries.Border.UseForLines = true;

>

>

> When you do this, the Border color, not the Series color is used to draw

> the line. After this you can control the color of the line independent

> from the color of the point by doing:

>

> chart1.Series[0].Border.Color = Color.Yellow;

>

> chart1.Series[1].Border.Color = Color.Blue;

>

>

> --

> Francisco Padron

> www.chartfx.com

Link to comment
Share on other sites

  • 1 year later...

but I want 3!?!

I have the same problem. I would like to see a future feature that allows us to tell the chart how to color the line. There should be options for before, after, both or none. I.E. the line before the point, after the point, both before and after (you decide how to resolve conflicts), or the line color should not be affected by the point color (always the series color).

The current problem is very evident when viewing time based data where the periodic measurements are taken at the end of a period. Imagine a chart of hourly data. Each hour a measurement and status is taken. A point is added to the chart at the correct place, and the color is set to indicate the measurement status (good, bad, incomplete, happy, sad, whatever). The status is for the hour before the measurement was taken, not after. But it is difficult (custom draw code) to get the chart to reflect this fact. 

 

 

 

 

Link to comment
Share on other sites

I don't see why in this case you need three colors.

The color of the line segment before and after the point can be changed independently. No problem. The limitation described in this posting relates to the border of the marker. The border of the marker (if drawn) shares the color with one of the line segments.

Link to comment
Share on other sites

 Frank,

While I was looking into this further, I came across another reason for my request for point-line relationship control. When highlighting a point or selecting a point through data tips, I would like the line before the point, not after, to be highlighted. If I hover over a line, I would like the marker at the end of the line to be selected. Thanks,

-Cody 

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...