Series Formatters

I'm trying to use the series.formatters attribute in the advanced visualisation editor.  I have built a simple bar graph which plots a metric against months of the year and I'd like to conditionally format the colours of the bars above a certain number.

Here is my code snippet:

 

{
  xAxis: {
    plotBands: [{
      to: 1546300800000,
      from: 1640995200000,
      label: {
        text: 'Covid'
      }
    }]
  },
  series: [{
    formatters: [{
      select: 'value >= 5500000',
      style: {
        color: 'orange'
      }
    }]
  }]
}

 

I can successfully create my x-band, and I do not seem to have errors with my formatters, but these won't apply. Can anyone see why it's not working?

0 4 42
4 REPLIES 4

That's strange! I copied your code verbatim into my test instance, and it seems to work just fine (once I changed 5500000 to match my data). 

 

sam8_0-1714583132529.png

 

 

All I can think is that there might be some other viz setting that's somehow competing with this? I recommend double checking the rest of your viz settings, or recreating the explore again without toggling any other viz setting.

Thanks Sam. 

I tried using a fresh Explore without toggling any settings and I still can't get it to work.

I used the code in a different instance and it worked fine. To test this I ran exactly the same query in my instance using the same Ecommerce data that is free in BigQuery and it wouldn't work in my Looker instance 🤔

I also don't have the option to inspect point metadata. They're running off different versions so I'll check if updating works

Good thinking on the versions. That's so strange that it would work on one instance and not the other, but hopefully bringing the older instance up to date helps!

Top Labels in this Space