TOPIC: Simple BarChartControl port from Lazarus
#1730
Simple BarChartControl port from Lazarus 8 Months, 2 Weeks ago
I did a port of a simple BarChartControl from Lazarus (www.freepascal.org) to suneido and I'm given it here with hope it will be useful for others.

Simple usage:
Window( #(BarChart (10, 8, 12, 2, 4, 7, 9, 18, 12, 13, 16, 23, 23) width:800 height:560))

Any comments/improvements are welcome !
File Attachment:
File Name: BarChartControl.zip
File Size: 2376
 
 
Last Edit: 2009/12/10 01:22 By mingodad.
 
#1736
Re:Simple BarChartControl port from Lazarus 8 Months, 2 Weeks ago
Thanks!
 
 
andrew
 
#1742
Re:Simple BarChartControl port from Lazarus 8 Months, 2 Weeks ago
Some fixes to BarChartControl.
File Attachment:
File Name: BarChartControl2.zip
File Size: 2588
 
 
#1750
Re:Simple BarChartControl port from Lazarus 8 Months, 2 Weeks ago
I made some modifications, in the original code doesn't show all parameters only displays (n -1), and
now It's possible print labels too. I don't know where to place the next code:


librec_info: #(lib_committed: "", parent_name: "UserInterface", parent_group: 0)




Try execute From WorkSpace:


Window( #(BarChart ("6.53", "8.35", "7.89", "5.8" ) ('Yanuary','Febrary','March','April') width:800 height:560 caption:"Ventas de Marķa"))
File Attachment:
File Name: BarChartControl_3.zip
File Size: 2681
 
 
#1752
Re:Simple BarChartControl port from Lazarus 8 Months, 2 Weeks ago
Thanks for helping me make it better I did another corrections and modifications.

The idea is that a chart has bars based on 3 pieces of data:

"Bar Header", Bar Value, Bar Color
String, Number, Color

SetBars accept an object with objects containing (BarHeader, BarValue, BarColor), if the color is missing it uses the default color.

SetBars also accept a query string and the name of the fields for BarHeader, BarValue and Barcolor fields.
File Attachment:
File Name: BarChartControl4.zip
File Size: 2603
 
 
Last Edit: 2009/12/12 01:22 By mingodad.