Class wibox.widget.piechart

Display percentage in a circle.

Note that this widget makes no attempts to prevent overlapping labels or labels drawn outside of the widget boundaries.

Usage:

    wibox.widget {
        data_list = {
            { 'L1', 100 },
            { 'L2', 200 },
            { 'L3', 300 },
        },
        border_width = 1,
        colors = {
            beautiful.bg_normal,
            beautiful.bg_highlight,
            beautiful.border_color,
        },
        widget = wibox.widget.piechart
    }

Info:

  • Copyright: 2012 Emmanuel Lepage Vallee
  • Author: Emmanuel Lepage Valle

Object properties

wibox.widget.piechart.data_list The pie chart data list.
wibox.widget.piechart.data The pie chart data.
wibox.widget.piechart.border_color The border color.
wibox.widget.piechart.border_width The pie elements border width.
wibox.widget.piechart.colors The pie chart colors.
wibox.widget.piechart.display_labels If the pie chart has labels.

Theme variables

beautiful.piechart_border_color The border color.
beautiful.piechart_border_width The pie elements border width.
beautiful.piechart_colors The pie chart colors.


Object properties

wibox.widget.piechart.data_list
The pie chart data list.

Type:

  • data_list table Sorted table where each entry has a label as its first value and a number as its second value.
wibox.widget.piechart.data
The pie chart data.

Type:

  • data table Labels as keys and number as value.
wibox.widget.piechart.border_color
The border color. If none is set, it will use current foreground (text) color.

Type:

  • color

See also:

wibox.widget.piechart.border_width
The pie elements border width.

Type:

  • border_width number (default 1)
wibox.widget.piechart.colors
The pie chart colors. If no color is set, only the border will be drawn. If less colors than required are set, colors will be re-used in order.

Type:

  • colors table A table of colors, one for each elements

See also:

wibox.widget.piechart.display_labels
If the pie chart has labels.

Type:

  • boolean (default true)

Theme variables

beautiful.piechart_border_color
The border color. If none is set, it will use current foreground (text) color.

Type:

  • color

See also:

beautiful.piechart_border_width
The pie elements border width.

Type:

  • border_width number (default 1)
beautiful.piechart_colors
The pie chart colors. If no color is set, only the border will be drawn. If less colors than required are set, colors will be re-used in order.

Type:

  • colors table A table of colors, one for each elements

See also:

generated by LDoc 1.4.2