How to :: highlight specific data

Warning

For now this option will only work on the horizontal-barchart type and from the code mode.

Overview

You can highlight in a different color labels in your chart.

📝 For example, you’re doing a ranking of competitors on your market and you want to highlight your brand.

Warning

Pay attention to indentation. It should be at the same level as “query”

Common onfiguration

In the above example, the lines with ‘label to highlight’ in the ‘column1’ column will be highlighted.

chartOptions:
  label: 'column1'
data:
  query: {}
  highlighted:
    column1: 'label to highlight'

Highlighted defined inside the dataset

The highlights can be handled directly in a column from the dataset :

label value highlight
France 3 1
China -10 0

Then the configuration block will be :

chartOptions:
  data:
    query:
      domain: "domain_name"
    highlighted: 'highlight'

The lines where ‘highlight=1’ will be highlighted.

Adapt highlights depending on multiple columns

Use this type of configuration if you want the highlights change depending on the filter

label value segmentation
France 3 femme
China 15 femme
France 20 homme
China 1 homme
  {
    level: 3
    title: "Sexe"
    parent_id: 102
    id: 10301

    chartOptions:
      filters:
        "upper-middle":
          on: "segmentation"

      chartType: "horizontalBarchart"
      label: "label"
      value: "value"
      sort: "desc"
      data:
        query: {}
        highlighted: [
          label: 'China'
          segmentation: 'femme'
        ,
          label: 'France'
          segmentation: 'homme'
        ]
  }
]