> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/opensource/flourish-charts/llms.txt > Use this file to discover all available pages before exploring further. # Flourish Create a graph using Flourish. The `Flourish` class for generating Flourish graphs in Python. ## Usage ```python class Flourish( anywidget.AnyWidget, details.DetailsMixin, bindings.DataBindingsMixin ) ``` ## Arguments | Argument | Type hint | Description | | ------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `chart_type` | `str`, optional | A chart type string for a graph in Flourish's library. Use `chart_type` instead of `template_id` and `template_version` where possible. | | `base_visualisation_id` | `str`, optional | Provide the numerical ID of an existing public Flourish visualization to reference it's configuration. | | `chart_description` | `str`, optional | A description of the chart contents for assistive technologies, such as screen-readers. For example “The line chart shows China consistently higher than the other countries since 1990”. Defaults to `None`. | | `template_id` | `str`, optional | A template ID, as set by Flourish, found at [https://app.flourish.studio/@flourish](https://app.flourish.studio/@flourish). Use if you can't use `chart_type` or `base_visualisation_id`. Defaults to `None`. | | `template_version_number` | `str`, optional | A template version number, as set by Flourish, found at [https://app.flourish.studio/@flourish](https://app.flourish.studio/@flourish). Use if you can't use `chart_type` or `base_visualisation_id`. Defaults to `None`. | | `width` | `int`, optional | Width of the graph. Defaults to `None`. | | `height` | `int`, optional | Height of the graph. Defaults to `None`. | | `api_key` | `str`, optional | A Flourish API key, which you can generate in your Flourish account. Defaults to `None`. | ## Class `Flourish` Objects ## Module Source Module `flourishcharts.flourish` The `flourish` function for generating Flourish graphs in R. ## Usage ```r flourish( chart_type = 'line', chart_description = 'Chart showing the number of households with internet increasing over 20 years', base_visualisation_id = NULL, template_id = '@flourish/line-bar-pie', template_version_number = 32.3.2, api_key = Sys.getenv("FLOURISH_API_KEY") ) ``` ## Arguments | Arguments | Description | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `chart_type` | Required - a chart type string for each graph in Flourish's library. Preferred usage compared to `template_id` and `template_version`. | | `chart_description` | Optional - A description of the chart contents for assistive technologies, such as screen-readers. For example “The line chart shows China consistently higher than the other countries since 1990”. | | `base_visualisation_id` | Optional - provide the numerical ID of an existing public (published) Flourish visualization to reference it's configuration. | | `template_id` | Optional - the Flourish template ID, found at [https://app.flourish.studio/@flourish](https://app.flourish.studio/@flourish). Use if you can't use `chart_type`. | | `template_version_number` | Optional - the template's version number. Also found at [https://app.flourish.studio/@flourish](https://app.flourish.studio/@flourish). Use if you can't use `chart_type`. | | `api_key` | Required - a Flourish API key, which you can generate in your Flourish account. Defaults to `Sys.getenv("FLOURISH_API_KEY")`. | ## Module Source `R/flourish.R`