Skip to content

Plotly

The Plotly chart engine supports the following chart types:

  • Bar chart
  • Horizontal bar chart
  • Pie chart
  • Line chart
  • Scatter plot

Base class for Plotly chart builders.

Defines supported chart types for Plotly engine.

Source code in ckanext/charts/chart_builders/plotly.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
class PlotlyBuilder(BaseChartBuilder):
    """Base class for Plotly chart builders.

    Defines supported chart types for Plotly engine.
    """

    @classmethod
    def get_supported_forms(cls) -> list[type[Any]]:
        return [
            PlotlyBarForm,
            PlotlyHoriontalBarForm,
            PlotlyPieForm,
            PlotlyLineForm,
            PlotlyScatterForm,
        ]

Bar chart

The bar chart is a chart with rectangular bars with lengths proportional to the values that they represent. The bars can be plotted vertically or horizontally. For a horizontal bar chart, use the Horizontal bar chart chart type.

Horizontal bar chart

The horizontal bar chart is a chart with rectangular bars with lengths proportional to the values that they represent. The bars are plotted horizontally.

Line chart

The line chart is a chart that displays information as a series of data points called 'markers' connected by straight line segments. It is useful for showing trends over time.

Pie chart

The pie chart is a circular statistical graphic that is divided into slices to illustrate numerical proportions. The arc length of each slice is proportional to the quantity it represents.

Scatter plot

The scatter plot is a chart that uses Cartesian coordinates to display values for two variables for a set of data. The data points are represented as individual dots.