Are there any easy methods to draw and update piechart than this?
- From: "praveen manja" <praveen_manja rediffmail com>
- To: gtk-list gnome org, gtk-app-devel-list gnome org, gnome-devel-list gnome org
- Subject: Are there any easy methods to draw and update piechart than this?
- Date: 21 May 2003 12:39:35 -0000
Hi Gnomites,
Please let me know if there are there any easy methods to draw and
update piechart than this.
I am developing a cluster management tool along with dynamic
resource monitoring component.
In GUI I have developed dynamically updated piecharts and
barcharts to show sys-resources.(as you can see process bars in
GTOP) .
I didn't use GnomeCanvasEllipse to draw the piechart, as the
whole ellipse has to be filled by a single color. But I need
different colors to be filled amongst the units of the piechart.
(Eg. In a piechart showing meminfo, I need green for Memfree
and orange for Mem used.)
Hence I was forced to use 360 isosceles triangles with :
length of a, b (of equal sides) = radius,
length of c = 1 unit (converted to canvas
unit)
angle = 1 deg (converted to radian)
Using the above info I iterated a loop to draw 360
polygons(triangle)
and later I updated the polygon points using
gtk_timeout_add()
and
gnome_canvas_item_set() in my callback to set the
new color of the already created triangle .
It is workin fine.
Please let me know if there are there any easy methods to draw and
update piechart than this.
Thanks,
Praveen S Manja.
___________________________________________________
Impress your clients! Send mail from me @ mycompany.com .
Just Rs.1499/year.
Click http://www.rediffmailpro.com to know more.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]