Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting Width on a Column Series: Using dotNetCharting

I need to set a static width of a bar chart series using dotNetCharting. My Graph has three series collections of line, spline, and column type. I would just like to set a static width for all series of column type.

I've tried using:

myChart.DefaultAxis.StaticColumnWidth = 10;

But the .DefaultAxis property isn't valid in intellisense for the whole chart nor the Column series collection. Do the series have to be added with data first before setting this?

Also, I've tried adding properties in the series object, no luck.

Any ideas?

like image 393
Ben Sewards Avatar asked Aug 16 '26 06:08

Ben Sewards


2 Answers

series["PixelPointWidth"] = "your value for width";
  • part of chart series collection: a custom property
like image 55
Ben Sewards Avatar answered Aug 18 '26 18:08

Ben Sewards


chart1.Series["Series1"]["PixelPointWidth"] = "1";

like image 45
Chenthil Avatar answered Aug 18 '26 19:08

Chenthil



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!