I have a problem with a pie chart


(Paulo Difficiliora) #1

I have a problem with a pie chart with these data

{"date" : "2016-01-01","p1":110,"p2":22,"p3":33},
{"date" : "2016-01-02","p1":120,"p2":102,"p3":32},
{"date" : "2016-01-02","p1":10,"p2":2,"p3":313}

can i have each slice with the total of the data with respect to time ?

Can you please advise how to solve this issue?

Thx


(Jon Budzenski) #2

You could do a date histogram on your date field, and then a sum metric. It'll look something like:

The sum aggregation will only work on one of your fields, so for example it'll add up all the p1 values. If you want to sum p1+p2+p3, you can pre-compute at index time or make a scripted field


(system) #3