How to adjust the bar spacing in ultrachart (barchart)? there is a big space between each bar.
bars are horizontal (not vertical) in this chart. thanks.
also i'm using ultra chart version: 8.3, charttype=bar chart
HI,
Here is a code snippet:
UltraChart1.BarChart.BarSpacing = 1'2D only UltraChart1.BarChart.SeriesSpacing = 2
Here is a help link ot Bar Chart Bar spacing
http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR2.0/html/Infragistics2.WebUI.UltraWebChart.v8.3~Infragistics.WebUI.UltraWebChart.UltraChart~BarChart.html
still not working, I have these 2 lines and also UltraChart1_ChartDrawItem (to narrow the bar height), nt sure that is causing this problem. still the barspacing is big eventhough the bars are narrow. is it possible to narrow the bar as well as reduce the barspacing (even less than 1).
UltraChart1.BarChart.BarSpacing = 1 '2D onlyUltraChart1.BarChart.SeriesSpacing = 2
Protected Sub UltraChart1_ChartDrawItem(ByVal sender As Object, ByVal e As Infragistics.UltraChart.Shared.Events.ChartDrawItemEventArgs) andles UltraChart1.ChartDrawItem
Dim columnWidth As Integer = 15
Dim box As Infragistics.UltraChart.Core.Primitives.Box = TryCast(e.Primitive, Infragistics.UltraChart.Core.Primitives.Box)
If box Is Nothing Then Exit Sub End If
If box.DataPoint Is Nothing Then Exit Sub End If
Dim dWidth As Integer = box.rect.Height - columnWidth
If dWidth <= 0 Then Exit Sub End If
box.rect.Height = columnWidth box.rect.Y += dWidth / 2
End Sub