Does anyone have a working snippet for fixing or standardizing the size of the bar in a bar chart? When I have too few series on the X axis the bars get really fat so I want them to have a fixed with regardless of the number of series. I thought this can be easily done by changing a value of a property during design time, so this is giving me a hard time as I am a beginner on this and I am not familiar yet with accessing the "primitives" or the elements of a chart.
Thanks!
After some tinkering I was able to fixed to bar width in the FillSceneGraph.
Right now there's no way to set the column/bar width by setting a property. Using FillSceneGraph or ChartDrawItem events is the correct approach. You can create a feature request for this functionality here:http://devcenter.infragistics.com/Protected/RequestFeature.aspx
can u kindly provide a code snippet how to set bar width in these events?
Here's an example of using FillSceneGraph to modify the first bar/column
private void ultraChart1_FillSceneGraph(object sender, Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs e){ foreach (Primitive p in e.SceneGraph) { Box box = p as Box; if (box != null && box.Layer != null) { if (box.Row == 0 && box.Column == 0) { box.rect.Width /= 2; box.PE.Fill = Color.Red; } } }}