Vega HeatMap


(Michael CC) #1

Hi everyone,

I'm trying to build a heatmap in Vega. I can't build it in the normal heatmap visualization because I need each cell to be a ratio.

I have 3 fields, X from 0 to 9, Y from 0 to 9 and Z with values 0 or 1.

My goal is to build a heat map where the value of each cell is the ratio of all [X,Y] where Z==1 divided by all [X,Y].

So I do the following query: "GET logstash-/_search?q=X:0 AND Y:0 AND Z:1" and the is the numerator value I'm looking for. And if I do this one: "GET logstash-/_search?q=X:0 AND Y:0" I get the denominator.

Is there a way of using the ratio of all the 100 combinations I get to build the heatmap?

Is there a simple example of building a heatmap with vega that I could follow? The only one I found is a bit complicated.

Thank you very much.

(kulkarni) #2

@nyuriks ...can u plz help here?


(Michael CC) #3

Hi again,

I found a simple example I could follow:

But I still encounter the same problem, how do I use the ratio between the results of two queries to color the cells.

Thank you!




Hi all,

I am interested in doing a very similar thing in a Kibana Heatmap. Is there no way to be able to perform such a calculation?

Many thanks in advance.


(system) closed #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.