How to :: add variation in code mode

Overview

Variation is available in most viz and can be used as a complementary piece of information.

Here is an example in a LeaderboardCenteredAverage

variation

variation

Configuration

chartOptions:
  data:
    query:
      domain: "example"
  chartType: "leaderboardCenteredAverage"
  groups: "group_column"
  value: "value_column"
  label: "label_column"
  variation: "ecart2011"
  variationLegend: "Écart significatif<br>// 2011"
  units:
    value_column: ""
    ecart2011: ""
  sort: 'desc'
  reverse: true
  average:
    values: [
      value: 8.2
    ]
    precision: ".1f"

How to read :

  • variation: variation column name in your dataset
  • variationLegend : label displayed in the screen

⚠️ Note that variation is optionnal. But when used, its unit needs to be configured in the units block.