Help

Is it possible to make a Pareto chart in Airtable?

Topic Labels: Extensions
336 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Babakd
4 - Data Explorer
4 - Data Explorer

Hello Airtable community,

Wondering if it's possible to make a pareto chart in Airtable. I'd appreciate your help!

1 Reply 1
James3
5 - Automation Enthusiast
5 - Automation Enthusiast

Yes!  I found this post when Googling how to reply and have just figured it out.  All AirTable plans can add the Vega-Lite extension, and the page https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order is a good start.

In my case I have a table called "Issues", with a field called "Problem".

The default definition after adding that exentsion and choosing the correct table is:

{
       "title""Issues",
       "width""container",
       "height""container",
       "mark""bar",
       "encoding": {
           "x": {
               "field""Problem",
               "type""nominal"
         },
         "y": {
               "aggregate""count",
               "type""quantitative"
         }
     }
}
 
And that gives a normal bar chart:
 
 
default.PNG
 
Adding a sort definition to x, like:
"sort": {"op": "count", "order": "descending"}
 
so that the code is now:
{
       "title""Issues",
       "width""container",
       "height""container",
       "mark""bar",
       "encoding": {
           "x": {
               "field""Problem",
               "type""nominal"
               "sort": {"op": "count", "order": "descending"} 
         },
         "y": {
               "aggregate""count",
               "type""quantitative"
         }
     }
}
 
This gives a Pareto chart:
Pareto.PNG