...
name | The internal reference name for the bite (not displayed). | |
title | Chart title to display. | |
description | Chart description to display. | |
type | Type of chart to display. key figure: a single numeric indicator (e.g. total population, number of organisations) | |
ingredient | Definition of the data to use in the chart (see below). | |
unit | The label to place under the number for a key figure. | |
numberFormat | The format to use for numbers: us: English format (“,” as thousands separator, “.” as decimal) If not provided, the format will be standard computer number format, with no thousands separator and “.” as the decimal separatoruiProperties | Definition of how the chart should be displayed (see below). |
“ingredient” object
...
fields
aggregateColumn | A HXL tag pattern identifying the reference column for aggregation (chart and timeseries only). | |||||
dateColumn | A HXL tag pattern identifying the column to use for dates (timeseries only). | |||||
valueColumn | A HXL tag pattern identifying the column containing values. | |||||
aggregateFunction | The aggregation function to apply to valueColumn. If the type is “chart” or “timeseries”, the aggregations will apply to each unique value of aggregateColumn. sum: add all of the values together (numbers only) | |||||
filtersWith | A filter for rows to include in the chart: it should be a list of JSON objects, where the keys are HXL tag patterns and the values are either literal values that must appear in rows to include, or the pseudo values “$MAX” (for the largest value) or “$MIN” (for the smallest value). For example, this filter would include only rows for the latest year (assuming it appears in a column with the HXL hashtag spec “#date+year”).
| |||||
filtersWithout | Like filtersWith, except that it’s a filter for rows to exclude from the chart. |
uiProperties object fields
unit | The label to place under the number for a key figure. |
numberFormat | The format to use for numbers: us: English format (“,” as thousands separator) If not provided, the format will be standard computer number format, with no thousands separator and “.” as the decimal separator. |
showGrid | Show a grid behind a bar chart or timeseries if true. |
swapAxis | Swap the X and Y axes in a bar chart if true. |
color | Hex RGB color code for a bar chart, e.g. “#FFFF00” for yellow. |
sortingByValue1 | Sort a bar chart by values. Use “ASC” for ascending, or “DESC” for descending. |
sortingByCategory1 | Sort a bar chart by categories (values in the aggregateColumn). Use “ASC” for ascending, or “DESC” for descending. |
Recipes
Recipes generate a list of bites that the user can choose from, based on the data available in the source dataset. It is similar to a Bite, except that “ingredient” changes to “ingredients”, and inside ingredients most of the fields become plural: aggregateColumns, dateColumns, valueColumns, and aggregateFunctions (but not filtersWith or filtersWithout). Each of this contains a list HXL tag patterns, for generating bites that the user may choose (depending on which columns appear in the source data). This example will provide options for the number of orgs, activities, sectors, or subsectors grouped by region, country, or 5 admin levels — up to 28 different bites, depending on what’s present in the source data:
...