Module blingbling.progress_graph

A progress graph widget.

Functions

set_background_color (graph, color) Fill all the widget (width * height) with this color (default is none ).
set_graph_background_color (graph, color) Fill the graph area background with this color (default is none).
set_rounded_size (graph, rounded_size) Set rounded corners for background and graph background.
set_v_margin (graph, margin) Define the top and bottom margin for the graph area.
set_h_margin (graph, margin) Define the left and right margin for the graph area.
set_graph_color (graph, color) Define the graph color.
set_graph_line_color (graph, color) Define the graph outline.
set_show_text (graph, boolean) Display text on the graph or not.
set_text_color (graph, color) Define the color of the text.
set_text_background_color (graph, color) Define the background color of the text.
set_font_size (graph, size) Define the text font size.
set_label (graph, text) Define the template of the text to display.
set_horizontal (graph, boolean) Define if the graph should increase/decrease horizontaly.
set_value (p_graph, value) Set the p_graph value.
progressgraph:set_height (height) Set the p_graph height.
progressgraph:set_width (width) Set the p_graph width.
progressgraph.new (args) Create a p_graph widget.


Functions

set_background_color (graph, color)
Fill all the widget (width * height) with this color (default is none ).

Parameters:

  • graph the graph
  • color a string "#rrggbbaa" or "#rrggbb"

Usage:

    mygraph:set_background_color(string) -->"#rrggbbaa"
set_graph_background_color (graph, color)
Fill the graph area background with this color (default is none).

Parameters:

  • graph the graph
  • color a string "#rrggbbaa" or "#rrggbb"

Usage:

    mygraph:set_graph_background_color(string) -->"#rrggbbaa"
set_rounded_size (graph, rounded_size)
Set rounded corners for background and graph background.

Parameters:

  • graph the graph
  • rounded_size float in [0,1]

Usage:

    mygraph:set_rounded_size(a) -> a in [0,1]
set_v_margin (graph, margin)
Define the top and bottom margin for the graph area.

Parameters:

  • graph the graph
  • margin an integer for top and bottom margin

Usage:

    mygraph:set_v_margin(integer)
set_h_margin (graph, margin)
Define the left and right margin for the graph area.

Parameters:

  • graph the graph
  • margin an integer for left and right margin

Usage:

    mygraph:set_h_margin(integer)
set_graph_color (graph, color)
Define the graph color.

Parameters:

  • graph the graph
  • color a string "#rrggbbaa" or "#rrggbb"

Usage:

    mygraph:set_graph_color(string) -->"#rrggbbaa"
set_graph_line_color (graph, color)
Define the graph outline.

Parameters:

  • graph the graph
  • color a string "#rrggbbaa" or "#rrggbb"

Usage:

    mygraph:set_graph_line_color(string) -->"#rrggbbaa"
set_show_text (graph, boolean)
Display text on the graph or not.

Parameters:

  • graph the graph
  • boolean true or false (default is false)

Usage:

    mygraph:set_show_text(boolean) --> true or false
set_text_color (graph, color)
Define the color of the text.

Parameters:

  • graph the graph
  • color a string "#rrggbbaa" or "#rrggbb" defaul is white

Usage:

    mygraph:set_text_color(string) -->"#rrggbbaa"
set_text_background_color (graph, color)
Define the background color of the text.

Parameters:

  • graph the graph
  • color a string "#rrggbbaa" or "#rrggbb"

Usage:

    mygraph:set_text_background_color(string) -->"#rrggbbaa"
set_font_size (graph, size)
Define the text font size.

Parameters:

  • graph the graph
  • size the font size

Usage:

    mygraph:set_font_size(integer)
set_label (graph, text)
Define the template of the text to display.

Parameters:

  • graph the graph
  • text the text to display

Usage:

     mygraph:set_label(string)
    By default the text is : (value_send_to_the_widget *100) .. "%"
    static string: example set_label("CPU usage:") will display "CUP usage:" on the graph
    dynamic string: use $percent in the string example set_label("Load $percent %") will display "Load 10%" 
set_horizontal (graph, boolean)
Define if the graph should increase/decrease horizontaly.

Parameters:

  • graph the graph
  • boolean true or false (false by default)

Usage:

    mygraph:set_horizontal(boolean) --> true or false
set_value (p_graph, value)
Set the p_graph value.

Parameters:

  • p_graph The progress bar.
  • value The progress bar value between 0 and 1.
progressgraph:set_height (height)
Set the p_graph height.

Parameters:

  • height The height to set.
progressgraph:set_width (width)
Set the p_graph width.

Parameters:

  • width The width to set.
progressgraph.new (args)
Create a p_graph widget.

Parameters:

  • args Standard widget() arguments. You should add width and height key to set p_graph geometry.

Returns:

    A p_graph widget.
generated by LDoc 1.3.12