Could someone do me a really big favour and point me to the bit of the code in the example below that actually sets the height of the bars. Many thanks I'm new to this sort of thing and don't fancy spending ages trying to work it out!
Sub CreateBarsTab
'It is not possible to draw directly on the panel that acts as the Tab page.
'This panel doesn't have an absolute size as its size changes to fit the TabHost available size.
'For that reason we add a panel to a panel.
Dim p AsPanel
p.Initialize("")
pnlBars.Initialize("pnlBars")
p.AddView(pnlBars, 0, 0, 95%x, 100%y - 100dip)
TabHost1.AddTab2("Bars Chart", p)
Dim BD AsBarData
BD.Initialize
BD.Target = pnlBars
BD.BarsWidth = 15dip
BD.Stacked = False
Charts.AddBarColor(BD, MakeTransparent(Colors.DarkGray, 230)) 'First bar color
Charts.AddBarColor(BD, MakeTransparent(Colors.Gray, 230))
Charts.AddBarColor(BD, MakeTransparent(Colors.LightGray, 230))
For i = 1To4
Charts.AddBarPoint(BD, 2005 + i, ArrayAsFloat(Rnd(0, 1000), Rnd(0, 1000), Rnd(0, 1000)))
Next
Dim G AsGraph
G.Initialize
G.Title = "Bars Chart"
G.XAxis = "Year"
G.YAxis = "Values"
G.YStart = 0
G.YEnd = 1000
G.YInterval = 100
G.AxisColor = Colors.Black
Charts.DrawBarsChart(G, BD, Colors.White)
End Sub
Sub CreateBarsTab
'It is not possible to draw directly on the panel that acts as the Tab page.
'This panel doesn't have an absolute size as its size changes to fit the TabHost available size.
'For that reason we add a panel to a panel.
Dim p AsPanel
p.Initialize("")
pnlBars.Initialize("pnlBars")
p.AddView(pnlBars, 0, 0, 95%x, 100%y - 100dip)
TabHost1.AddTab2("Bars Chart", p)
Dim BD AsBarData
BD.Initialize
BD.Target = pnlBars
BD.BarsWidth = 15dip
BD.Stacked = False
Charts.AddBarColor(BD, MakeTransparent(Colors.DarkGray, 230)) 'First bar color
Charts.AddBarColor(BD, MakeTransparent(Colors.Gray, 230))
Charts.AddBarColor(BD, MakeTransparent(Colors.LightGray, 230))
For i = 1To4
Charts.AddBarPoint(BD, 2005 + i, ArrayAsFloat(Rnd(0, 1000), Rnd(0, 1000), Rnd(0, 1000)))
Next
Dim G AsGraph
G.Initialize
G.Title = "Bars Chart"
G.XAxis = "Year"
G.YAxis = "Values"
G.YStart = 0
G.YEnd = 1000
G.YInterval = 100
G.AxisColor = Colors.Black
Charts.DrawBarsChart(G, BD, Colors.White)
End Sub