Is it possible to control the width of the bars drawn in a bar graph? The bars being drawn in my application are more narrow than I would like them to be. The result is a lot more whitespace than I would prefer.
My chart is populated by setting the ItemsSource property to an ObservableCollection<Activity>. (Activity is just a simple object I've defined with several properties, including a string property with the name of Priority.)
My mappings are set up with the following code:
<code>
SeriesMapping seriesMapping = new SeriesMapping();
seriesMapping.SeriesDefinition = new BarSeriesDefinition();
seriesMapping.ItemMappings.Add(new ItemMapping("Priority", DataPointMember.XCategory));
ItemMapping yItem = new ItemMapping();
yItem.AggregateFunction = ChartAggregateFunction.Count;
yItem.DataPointMember = DataPointMember.YValue;
seriesMapping.ItemMappings.Add(yItem);
seriesMapping.GroupingSettings.GroupDescriptors.Add(new ChartGroupDescriptor("Priority"));
chartControl.SeriesMappings.Clear();
chartControl.SeriesMappings.Add(seriesMapping);
</code>
I have attached a screenshot of the resulting graph. I would like the bars to be thicker and take up more of the whitespace of the graph. If possible, I would also like the bars to be centered over the labels underneath each category.