AirGradient Forum

Controlling public display / website widget graph display

I really like the ability to create a public display website widget (see Embedding Air Quality Displays on Public Screens & Websites if you’re not familiar). I’m wondering if there’s a way currently or a plan for the future to adjust the graph that’s displayed in the chart view.

I do want the graph to display PM2.5 levels, but I would prefer it to show US AQI instead of ug/m3. It would also be neat if it could display multiple graphs so we could also see temperature/heat index over time.

Hi @john,

Great to see you enjoying this feature!

It is actually possible to make the graph show AQI instead, but it’s not noted at the moment. All you need to do is click on the AQI measurement (where it says 24.7 PM2.5 (US AQI) in the image below), and the whole graph will change.

You can try it out on this test display I made here (just click on the metric in the top-left, and the graph will update):

https://app.airgradient.com/display/xN3qke3ozO/charts

This isn’t very well noted, though, so it’s very understandable that you didn’t know this. I will make a note to add this to the guide you linked!

I will also ask our team if adding multiple graphs is something we can look into. Thank you for the suggestion!

Once clicked, it will look like this. Please note how the average line and bars now show AQI instead.

Thanks, @Ethan_AirGradient! Somehow it didn’t even occur to me to try clicking on those, probably in part because I was testing mainly with a tablet, which doesn’t really have the hover states going over the numbers.

I think the UI is just a tiny bit confusing, especially when you uncheck the ug/m3 option for the widget. It seems the graph always defaults to ug/m3, even when it isn’t a selected parameter for the widget. If your widget does include that parameter, you see it in the chosenMeasure state like this, with a white border around it:

Just seeing the border around it makes it clear that it’s selected.

But if the widget doesn’t include ug/m3, nothing is in the active state, and the default graph doesn’t even correspond to any of the numbers. I was going to include an image demonstrating this, but I’m a new user and can only include one upload, and your first image actually demonstrates it anyway.

Long story short, I think it would also be nice if either:

  1. You can select which metric should be the default graph (choices limited to what’s been included for the widget)
  2. The widget defaults to displaying a graph for a metric that is actually included.

Thanks again!