Forum Discussion

smpa01's avatar
smpa01
Icon for Community Champion rankCommunity Champion
5 years ago
Solved

Does Vega-Lite Aggregate take place inside Deneb?

dm-p  I think it is probably a better platform for Q&A for my issue than Twitter.

 

I tried to replicate the following

 

 

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",  
  "data": {"url": "data/cars.json"},
  "mark": {"type": "bar", "strokeWidth": 0.1, "stroke": "white"},
  "encoding": {
    "x": {"field": "Horsepower", "type": "quantitative", "axis": {"labelAngle": 0}},
    "y": {"aggregate": "count", "field":"Horsepower", "type": "quantitative"}
  }
}

 

 

 in Deneb

 

 

 

{
   "data":{
      "name":"dataset"
   },
   "mark":{
      "type":"bar",
      "tooltip":true
   },
   "encoding":{
      "x":{
         "field":"Horsepower",
         "type":"quantitative",
         "axis":{
            "labelAngle":0
         }
      },
      "y":{
         "aggregate":"count",
         "field":"Horsepower",
         "type":"quantitative"
      }
   }
}

 

 

 where I can use Vega-Lite's Aggregate on the same field to generate the marks for Y axis. It works perfectly fine in the browser but fails in Deneb. 

 

But it succeeds with a DAX measure

 

 

I am just trying to understand are Vega-Lite's native Encoding Aggregate deemed not to work in Deneb?

 

Many thanks in advance.

2 Replies

    • smpa01's avatar
      smpa01
      Icon for Community Champion rankCommunity Champion

      Awesome dm-p  many thanks for looking into it. I started with Vega-Lite and Deneb. So chances are that you would hear a lot from me (questions) moving forward !!!  😀 and apologies for making you look at different places for this question. By the time I saw your tweet to post this on Github, I already posted here.