1

changing the size of my chart is corrupting the positions of my custom labels:

enter image description here to enter image description here

 foreach (var twobars in myBars)
 {
   //...
   ChartAreas[0].AxisX.CustomLabels.Add(
   Series.Last().Points.Count,
   Series.Last().Points.Count + 2,
   String.Format("[{0:0.###}; {1:0.###}]",
   extendetDataPoint.BeginRangeBy,
   extendetDataPoint.BeginRangeNext));
 }

.NET Framework CustomLabelsCollection.Add Method

How can i turn off this misbehavior?

eddy white
  • 301
  • 2
  • 24
  • You need to set it so that the from- and to-position values are referring to the __values__, not the point __indices__! It would help to know your y-values and what `extendedDataPoint` or `myBars` are.. Also maybe the `//..` part ? Just when do you set them? - See [here](http://stackoverflow.com/questions/32432342/different-label-types-on-one-axis-in-chart/32444146?s=3|0.3383#32444146) for an example! – TaW Feb 09 '16 at 14:51
  • Try calling `ChartArea.RecalculateAxesScale` as is mentioned [here](https://msdn.microsoft.com/en-us/library/dd488407%28v=vs.110%29.aspx) – TaW Feb 09 '16 at 15:06
  • thx for your suggestions, but none helped me out. I figured out a solution by myself by setting the "summe(218)NaN(10/218)" from custom label to chart Title – eddy white Feb 10 '16 at 14:02

0 Answers0