GC.legend()
Set the legend.
Usage
python
chart.legend(
group,
show,
background_color,
order,
position,
align,
style,
legend_options,
legend_text_options,
corner_radius,
group_style,
**options,
)An argument shown without a default is optional too: left out, the chart keeps its default.
chart is a GC chart.
Arguments
| Argument | Type | Description |
|---|---|---|
group | str or bool, optional | Column of the groups in the legend. Default: the group of the chart. False hides the legend. |
show | bool | Whether to show the legend. Default True. |
background_color | str, optional | Background colour of the legend; style={"backgroundColor": ...} takes precedence. Default: the theme's, else transparent. |
order | list | The order of the groups in the legend. |
position | str, optional | "top" or "bottom". Default: the theme's, else "bottom". |
align | str, optional | "left", "center" or "right". Default: the theme's, else "left". |
style | dict | CSS styles of the legend. |
legend_options | dict | Options of the markers (markerStyle in the spec). |
legend_text_options | dict | Options of the text (textStyle in the spec). |
corner_radius | float, optional | Radius in pixels of the rounded corners of the markers. |
group_style | dict of dict, optional | Styles of the entry of a group, e.g. {"tnsA": {"fontStyle": "italic"}}; styles in marker go to its marker. |
**options | Further options, e.g. orientation="vertical". |
Value
GC: The chart.
