Question

Scatter plots with metrics only on X & Y axes

  • 11 October 2019
  • 14 replies
  • 3879 views

Userlevel 2

I don’t see a way currently to have a scatterplot where the X & Y axes are both metrics like in this example chart. I’m able to do this in Data Studio but I don’t see a way to do it in Looker. When I try to replicate, it looks like there needs to be a dimension on at least one of the axes, rather than one bubble showing up for each dimension.


image


14 replies

Userlevel 7
Badge +1

I bet others have better and up to date examples, but this very old how-to shows an example:
 

 


As of version 3.28, you can now plot measure vs. measure scatterplots. This can be done by hiding the dimension(s) in the data table from the visualization.
For example, say you have this data table:
[image]
In order to chart Orders Count vs. Order Items Total Sale Price, you will want to hide Users Age from the visualization by selecting Hide from Visualization from that column’s gear dropdown:
[image]
After selecting scatter from the chart icon options, you should see a chart like this! …

 

 

Unless you’re running Looker pre 3.28, in which case… You may have some bigger fish to fry 😉

 

Hi there, I have a related question to this discussion. I am trying to do the same as Ben but I want to make it so that each point on the bubble chart (measure vs measure) can be its own series and thus have its own color (which would be shown on the legend). Any pointers?

Userlevel 7
Badge +1

Hmm, I’m not sure how to do this. Maybe by pivoting? If you have a dimension and 2 measures right now, and are only showing the measures in the scatter plot, if you pivot on the dimension you’ll get each one as its own series…


I think this might not work as it would render 2 series per dimension value (for each measure) but it may be worth exploring.


Followup: How many points do you have?

Thanks for the suggestion. I actually already tried that and like you said, it rendered 2 series per dimension value. I have 8 points and want each to be their own color (series).

You can do it in the vega visualization by selecting X as one of measures and Y as the other measure (under 1. Axes). Then under (2. Mark) choose Mark Type as Circle and Color as your Dimension.


It’s not super pretty but it does what you’re asking.

Userlevel 7
Badge +1

For reference:


Userlevel 2

Are there plans to address this in future viz releases? As it stands, the scatterplot chart is useless in our situations. Making things worse, we’ve gone the vega route before, but none of that works with the linked tile beta dashboards.

Userlevel 7
Badge +1

There’s no immediate plans to change this, but we’re hearing a lot of feedback over here and looking into it. There’s some workarounds described in the thread as well that may prove helpful to you!


Hey, 6 months ago this was being looked into. Any progress?

Still broken as far as I can tell. Desperately trying to get a measure as an x value and a table calc as a y value.

As a work around, I’ve found that if you need to swap, you can just add a table calc column equal to the one you want to be the x axis at the end of your table, and then it works if you hide all the other columns from the viz.

Any update? Enabling this to be straight forward would be greatly appreciated :)

+1000

Hi, just checking to see if this is still possible or does Looker have a bubble chart like data studio ?

Reply