Bullet tile :: configuration examples

Warning

This is only available from the old home configuration and code mode. ⚠️ the chartOptions & data are deprecated, make sure to use de datasets/charts configuration.

Ex1 : Bullet with target

Tile bullet target

Data structure

| country     | gross | budget |
|-------------|-------|--------|
| France      | 30.6  |   9    |

Config file

{
  type: 'bullet'
  name: 'With target'
  chartOptions:
    value: 'gross'
    target: 'budget'
    data:
      query:
        domain: 'time_country'
        country: 'France'
        title_year: '2016'
}

Ex2 : Bullet with target and comparison

Adding a comparison zone

Bullet with comparison and target

Data structure

| country     | gross | budget | previous_gross |
|-------------|-------|--------|----------------|
| France      | 40.1  |   8.6  |       8.1      |

Config file

{
  type: 'bullet'
  name: 'With target'
  chartOptions:
    value: 'gross'
    target: 'budget'
    comparison: 'budget'
    data:
      query:
        domain: 'time_country'
        country: 'France'
        title_year: '2016'
}

Ex3 : Bullet with sentiment

Adding a sentiment

Bullet with comparison and target

Data structure

| country     | gross | budget | previous_gross |
|-------------|-------|--------|----------------|
| France      | 40.1  |   8.6  |       8.1      |

Config file

{
  type: 'bullet'
  name: 'With target'
  chartOptions:
    value: 'gross'
    target: 'budget'
    comparison: 'budget'
    data:
      query:
        domain: 'time_country'
        country: 'France'
        title_year: '2016'
    sentiment:
      gross:
        domain: ['budget']
        range: ['negative','positive']
}

Ex4 : Bullet with units

Adding different units on value, target and comparison

Bullet with units

Data structure

| country     | gross | budget | previous_gross |
|-------------|-------|--------|----------------|
| France      | 40.1  |   8.6  |       8.1      |

Config file

{
  type: 'bullet'
  name: 'With target'
  chartOptions:
    value: 'gross'
    target: 'budget'
    comparison: 'budget'
    data:
      query:
        domain: 'time_country'
        country: 'France'
        title_year: '2016'
    units:
      "gross": " %"
      "budget": " M€"
      "previous_gross": " %"
}