I'm using Visual Studio 2010 to write a Winforms application in C#. I'm using the chart control from the regular toolbox to view data from my SQL database. As you see, the bar is very wide. Is there some property or way to make it smaller, and fixed?
I did a small example binding three values and set the PixelPointWidth of dataPointCustomProperties.
int[] liste = new int[] { 1, 2, 3 };//, 4, 5, 6, 7 }; chart1.Series["Series1"].Points.DataBind(liste, "sampleData", "count", "Tooltip=count"); // dataPointCustomProperties chart1.Series["Series1"]["PixelPointWidth"] = "1";
will result in this chart
You can use the following Code :
Chart1.Series["Series1"]["PixelPointWidth"] = "15";
Thank you.
You can also set the PixelPointWidth in the report designer as below.
- Click on the chart series, press
F4 to show the properties. - Change the
PixelPointWidth in CustomAttributes node.