Component description

The datasets property defines what data is used for API charts.

Minimal JSON

{
  "dataApi": ""
}
{
  "type": "api-chart",
  "data": {
    "datasets": [
      {
        "dataApi": "https://help.dawiso.com/api/chart/statistics/core_statistic_chart_number_visited_pages/buckets",
        "options": {
          "maintainAspectRatio": false,
          "label": "total"
        }
      }
    ]
  }
}

Example taken from the core_dashboard_adoption package.

Nested properties

PropertyDescriptionValuesMandatory
dataApiRelative or absolute API path which returns a data list that is transformed into data. See the full list of available API endpoints.stringYes
filterConditions used to limit or refine data selection. For more information, see filter.jsonNo
optionsAdditional properties of the dataset (e.g. label) defined using Chart.js dataset-level options, which differ based on chart type. For more information, see Chart.js documentation: Bar chart dataset options, Doughnut and pie charts dataset options, Line chart dataset options, Polar area chart dataset options, Radar chart dataset optionsjsonNo