0

How do I change the color of these arrows? I'm developing a feature to highlight selected elements and the other others show in a light gray color, but can't find how to change the color of the arrow

chart1.Series[line_name].Color = Color.LightGrey;  // color of the lines

point.Color                    = Color.LightGray;  // color of the dots
point.LabelForeColor           = Color.LightGray;  // color of the text labels

any ideas?

chart

EduardoT80
  • 19
  • 1
  • 5
  • Can you show how you create the arrows in the 1st place? – TaW May 26 '20 at 18:16
  • I don't! They simply appear when there are too many DataPoint elements close together. When I zoom in, they spread out and the arrows disappear, and only the label text is shown, next to the point. – EduardoT80 May 26 '20 at 19:09
  • At least tell us which ChartType you use! – TaW May 26 '20 at 20:06
  • it's a Point chart! – EduardoT80 May 26 '20 at 20:30
  • Ok,. I did a few tests but I'm afraid there is no way to make those callout lines anything but black. There are [custom properties](https://learn.microsoft.com/en-us/previous-versions/dd456764(v=vs.140)?redirectedfrom=MSDN) that sound promising but they won't work here,, – TaW May 26 '20 at 21:08
  • thank you, will have a look at this custom properties, otherwise I'll probably have to manually add a text on the chart close to the points, using XY values, then I'll be able to change color, but it's not the most elegant solution – EduardoT80 May 26 '20 at 21:58
  • Well why not change the points or use markers? They can be colored and sized easily.. – TaW May 26 '20 at 22:17
  • 1
    Found how: `chart1.Series["Series1"].SmartLabelStyle.CalloutLineColor = Color.LightGreen;` this sets the color for all DataPoint elements in the Chart Series – EduardoT80 May 26 '20 at 23:05
  • I'll try to find a way to change the color of every DataPoint element, but they don't have the SmartLabelStyle property. – EduardoT80 May 26 '20 at 23:10
  • to eliminate those arrows you can do the following, but the chart could get messy if you have a lot of data: `chart1.Series["Series1"].SmartLabelStyle.IsMarkerOverlappingAllowed = true;` – EduardoT80 May 26 '20 at 23:27

0 Answers0