Pie Chart 2

Qubes 9.0 Pie chart 2 graphic component.

Properties

PropertyDescription
DataPie chart data (list of numerical values).
DataColorsList of colors associated with the data labels (colors in HTML format).
DataLabelsList of data labels.
EnabledBoolean indicating whether or not the component is enabled.
HintSpecifies the user hint string that will appear in the component's interactive help bubble.
LegendHow the legend is displayed. 'auto' displays the legend according to the cell alignment of the graph.
An empty field won't display the legend. If you want the legend to be displayed in a Legend component, you will need to indicate the name of that Legend component.
StyleAdvanced and optional style properties for the graph. When specified, it must be a list of keys and values. Learn more about its syntax and possibilities at Graph Style Property.
TextFormatFormat of values' in the text displayed on hover (see FormatFloat for more informations) (Qubes 10.0).
ValueInitialDetermines the component's initial value when the screen opens and each time it is reset (see Reset Button).
VisibleBoolean indicating whether or not the component will be visible.

Value

(Qubes 10.0)
Returns the label of the selected sector.

Remarks

If you want to force a line return in the labels, you have to add <br> inside your String.

If the graph is located inside layers whose Visible property is dynamic, it is recommended to set the graph's Enabled to false to avoid undesired behaviour with mouse events.

If the Legend attribute is set to 'auto', you can click on the data's name to individualy hide or display the corresponding sector.
In that case, the position of the legend inside the graph is defined by the cell alignment.

The only supported fonts currently are : "Arial", "Balto", "Courier New", "Droid Sans", "Droid Serif", "Droid Sans Mono", "Gravitas One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans Narrow", "Raleway", "Times New Roman". Any other font applied to this component will be interpreted as "Times New Roman".

This component does not require Internet access, but does need a browser that supports HTML5 Canvas. In practice, all modern browsers but Internet Explorer 8 and below support it.

Examples

The following settings were defined to generate the above pie chart:

  • To set the data colors:
DataColors=List("#B980F0", "#FE9898", "#F5E79D", "#E5FBB8")
  • The component was left to use its own integrated legend:
    Here the graph is centered.
Legend=auto
  • The component style wasn't modified:
Style=''
  • The data defined:
Data=List(45, 87, 48, 45)
  • The data labels defined:
DataLabels=List("A", "B", "C", "D")
  • Format of the values' text on hover (Qubes 10.0):
TextFormat='%.2f kg'

Classification

Graphiques