---
title: "Chart"
url: "https://nov18-dev.movespot.fyi/apis/konnect-analytics-dashboards-2/versions/62158128-8b73-4a90-ae97-da37b5a2ea32/schemas/Chart"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-analytics-dashboards-2/versions/62158128-8b73-4a90-ae97-da37b5a2ea32.md

# Chart

The type of chart to render.

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Analytics Dashboards
  version: 2.0.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
components:
  schemas:
    DonutChart:
      description: >
        A chart that can display one-dimensional data in a hollow, segmented
        circle.  To use this chart, ensure that

        the query includes only one dimension (not `time`).
      type: object
      properties:
        chart_title:
          description: The title of the chart, which is displayed in the tile's header.
          type: string
          nullable: false
        type:
          type: string
          enum:
            - donut
      additionalProperties: false
      required:
        - type
      title: Donut chart
    TimeseriesChart:
      description: >
        A chart that can render timeseries data -- data from a query that has
        `time` as a dimension -- as lines or bars.


        This type of chart can support:


        - One or more metrics: `{ metrics: ["response_latency_p99",
        "response_latency_p95"], dimensions: ["time"] }`

        - One metric plus one non-time dimension: `{ metrics: ["request_count"],
        dimensions: ["time", "gateway_service"] }` 


        Either way, ensure that `time` is in the list of query dimensions.
      type: object
      properties:
        chart_title:
          description: The title of the chart, which is displayed in the tile's header.
          type: string
          nullable: false
        type:
          type: string
          enum:
            - timeseries_line
            - timeseries_bar
        stacked:
          description: >
            Whether to stack the bars or lines (implicitly adding them together
            to form a total), or leave them independent from each other.
          type: boolean
          nullable: false
      additionalProperties: false
      required:
        - type
      title: Timeseries chart
    BarChart:
      description: >
        A chart that can display non-timeseries data as bars.  This type of
        chart supports up to 2 dimensions (not `time`).

        To render a bar chart of timeseries data, use a `timeseries_bar` chart
        instead.
      type: object
      properties:
        chart_title:
          description: The title of the chart, which is displayed in the tile's header.
          type: string
          nullable: false
        type:
          type: string
          enum:
            - horizontal_bar
            - vertical_bar
        stacked:
          description: >
            Whether to stack the bars (implicitly adding them together to form a
            total), or leave them independent from each other.
          type: boolean
          nullable: false
      additionalProperties: false
      required:
        - type
      title: Bar chart
    SingleValueChart:
      description: A chart that can render a single number.  This chart works with a
        single metric and no dimensions.
      type: object
      properties:
        chart_title:
          description: The title of the chart, which is displayed in the tile's header.
          type: string
          nullable: false
        type:
          type: string
          enum:
            - single_value
        decimal_points:
          description: The number of figures to render after the decimal.  Most metrics
            only support up to 2 decimals, but some may support more.
          type: number
      additionalProperties: false
      required:
        - type
      title: Single value chart
    ChoroplethMapChart:
      description: >
        A chart that displays data on a world map. Each region on the map is
        colored based on the metric value.

        This chart works only with the `api_usage` datasource and requires a
        single metric and a single dimension of `country_code`.

        No additional dimensions are supported.
      type: object
      properties:
        chart_title:
          description: The title of the chart, which is displayed in the tile's header.
          type: string
          nullable: false
        type:
          type: string
          enum:
            - choropleth_map
      additionalProperties: false
      required:
        - type
      title: Choropleth map chart
    Chart:
      description: The type of chart to render.
      discriminator:
        propertyName: type
        mapping:
          donut: "#/components/schemas/DonutChart"
          timeseries_line: "#/components/schemas/TimeseriesChart"
          timeseries_bar: "#/components/schemas/TimeseriesChart"
          horizontal_bar: "#/components/schemas/BarChart"
          vertical_bar: "#/components/schemas/BarChart"
          single_value: "#/components/schemas/SingleValueChart"
          choropleth_map: "#/components/schemas/ChoroplethMapChart"
      oneOf:
        - $ref: "#/components/schemas/DonutChart"
        - $ref: "#/components/schemas/TimeseriesChart"
        - $ref: "#/components/schemas/BarChart"
        - $ref: "#/components/schemas/SingleValueChart"
        - $ref: "#/components/schemas/ChoroplethMapChart"
```
