Module blingbling.wlourf_circle_graph
Circle graph from wlourf.
Functions
-
set_v_margin (margin)
-
Define the top and bottom margin for the graph area.
Parameters:
- margin
an integer for top and bottom margin
Usage:
circle:set_v_margin(integer)
-
set_h_margin (margin)
-
Define the left and right margin for the graph area.
Parameters:
- margin
an integer for left and right margin
Usage:
circle:set_h_margin()
-
set_radius (radius)
-
Set the radius of the circle.
Parameters:
- radius
an integer value for the radius of the circle
Usage:
circle:set_radius(integer)
-
set_graph_color (color)
-
Set the default color for the graph.
Parameters:
- color
a string "#rrggbbaa" or "#rrggbb"
Usage:
circle:set_graph_color(string) -->"#rrggbbaa"
-
set_graph_colors (colors)
-
Set the colors and theirs ranges for the graph.
Parameters:
- colors
a table of tables {color , float } with color a string "#rrggbbaa" or "#rrggbb" and float which is 0<=float<=1
Usage:
circle:set_graph_colors({{"#88aa00ff",0}, {"#d4aa00ff", 0.5},
{"#d45500ff",0.77}})
-
set_show_text (boolean)
-
Display text on the graph or not.
Parameters:
- boolean
true or false (default is false)
Usage:
circle:set_show_text(boolean) --> true or false
-
set_font (font)
-
Define the text's font .
Parameters:
- font
a string that contains the font name family and weight
Usage:
circle:set_font(string)
-
set_font_size (size)
-
Define the text font size.
Parameters:
Usage:
circle:set_font_size(integer)
-
set_label (text)
-
Define the text to display.
Parameters:
Usage:
circle:set_label(string)
-
circle_graph:set_height (height)
-
Set the c_graph height.
Parameters:
- height
The height to set.
-
circle_graph:set_width (width)
-
Set the graph width.
Parameters:
-
circle_graph.new (args)
-
Create a c_graph widget.
Parameters:
- args
Standard widget() arguments. You should add width and height
key to set graph geometry.
Returns:
A graph widget.
Local Functions
-
set_value (c_graph, value)
-
Set the c_graph value.
Parameters:
- c_graph
The progress bar.
- value
The progress bar value between 0 and 1.