![]() |
]project-open[ Core : Home | |
|
The chart libary is lacated in the file
tcl/intranet-chart-procs.tcl
It consists mainly of the procedure called
im_get_chartwhich has the follogin API:
im_get_chart x_axis y_axis data [ default_dim ] Parameters: x_axis [list start_val end_val display_interval unit [scale]] y_axis [list start_val end_val display_interval unit [scale]] data [list [list x_val y_val size info link (image)]*] default_dim [list margin_left margin_top width height arrows_p] (default "")
As described in the API the x and y-axis may be defined, a list with data may be provided and some default dimensions and configuration settings may be specified.
With the following code this nice chart is generated:
set x_axis [list 0 1000 100 "kg"] set y_axis [list 0 10000 1000 "Euro"] set data [list [list 400 6000 30 "Test" "https://www.news.ch"]] set settings [list 0 30 800 400 "t"] set page_body [im_get_chart $x_axis $y_axis $data $settings]