0

I am using a MS chart for displaying some information and i have to show different charts when the user clicks a bar. All that works totally fine. but the width is totally out of my control. It looks really weird. I tried to adjust it using :

 series["PointWidth"] = pointWidth.ToString();

But if the bars are placed far from each other. They widen drastically making it look very worse. Is there a way i can provide a constant width for all the bars?

And also how can i calculate the width of the x axis plane. Since the Width should be dynamic as per the number of bar. I would have to calculate it...any help ????

user3305453
  • 13
  • 1
  • 6

2 Answers2

2
Chart1.Series[0]("PixelPointWidth") = 2
TylerDurden
  • 1,632
  • 1
  • 20
  • 30
  • How can i know the width of the x-axis? – user3305453 Mar 21 '14 at 11:15
  • you didn't ask about x-axis width initially. should open a new question rather than unaccept answer and ask new question `Chart1.ChartAreas(0).AxisX.LineWidth` is the line width of the axis and `Chart1.ChartAreas(0).AxisX.Interval` sets the intervals between the points on the x axis – TylerDurden Mar 21 '14 at 12:08
  • did any of this help? – TylerDurden Mar 25 '14 at 11:57
0
Series.ForEach(s => s["PixelPointWidth"] = "50" );

Full list of CustomProperties

Rm558
  • 4,621
  • 3
  • 38
  • 43