[Gambas-user] gb.chart

Fabien Bodard gambas.fr at ...626...
Mon Oct 26 11:58:42 CET 2009


2009/10/26 Andrea Bertini <and.bertini at ...626...>:
> the help-code given doesn't work with release 2.16.
>
> Messages:
> =========
> 'the values count must be up then 1'
> 'no current device'
>
> Code:
> =====
> DIM mychart AS NEW Chart (not writte in the help but inserted)
> mychart.Count = 3
> mychart[0].Values = [1.0, 2.0, 3.0]
> mychart.Headers.Values = ["tic", "tac", "toes"]
> mychart.Legend.Visible = TRUE
> mychart.Style = ChartType.Pie
> mychart.Width = DrawingArea1.W
> mychart.Height = DrawingArea1.H
> mychart.Draw
>

on what are you drawing ?

you must drawing on a drawing area !!...

so in the _Draw event of the drawing area!


or at least you setup the cached property of the drawing area to true and  :

DIM mychart AS NEW Chart (not writte in the help but inserted)
mychart.Count = 3
mychart[0].Values = [1.0, 2.0, 3.0]
mychart.Headers.Values = ["tic", "tac", "toes"]
mychart.Legend.Visible = TRUE
mychart.Style = ChartType.Pie
mychart.Width = DrawingArea1.W
mychart.Height = DrawingArea1.H
Draw.begin(DrawingArea1)
mychart.Draw
Draw.end
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>




More information about the User mailing list