Coloring based on status field


(kalangara) #1

I have the data as follows:
Server, Application, Status
Computer1, ABC, 1
Computer1, EFG, 1
Computer1, IKJ, 0
Computer2, NMO, 1
Computer2, PQR, 1
Computer2, STU, 1

I would like to show a stacked chart which shows

|
|
| :white_small_square::white_small_square::white_small_square::white_small_square: :black_small_square::black_small_square::black_small_square::black_small_square:
| :black_small_square::black_small_square::black_small_square::black_small_square: :black_small_square::black_small_square::black_small_square::black_small_square:
| :black_small_square::black_small_square::black_small_square::black_small_square: :black_small_square::black_small_square::black_small_square::black_small_square:
|_____________________________________
Computer1 Computer2

which means IKJ is show in different color!
I was abled to do it by showing computer1-2 and applicaions on it but the state of Application in different colour was not possible.

How can this be acheived.
Regards,
Ginu


(Lee Drengenberg) #2

You probably just need to split buckets and do another terms aggregation on your application field. In this screenshot I did 2 terms aggregations. One on extension.raw, and then another on agent.raw. This gives me 1 bar for each extension.raw field value, and a stacked section for each agent.raw field. I didn't include the legend for the chart but it lists each agent.raw value.

The other type of visualization you might want to try is a Heatmap.


(kalangara) #3

Hi Lee
Thanks for the suggestion. I have already done that. see the attachment:

But as you see my requriement is further a status on extension.raw in your example. ie JPEG and without any caring about count.

| :white_large_square: :black_large_square:
| :black_large_square: :black_large_square:
| :black_large_square: :black_large_square:
|_____________________________________
C1 C2

in the data below onc IKJ (on computer C1)is having status =0 shown in black
Server, Application, Status
C1, ABC, 1
C1, EFG, 1
C1, IKJ, 0
C2, NMO, 1
C2, PQR, 1
C2, STU, 1


(Lee Drengenberg) #4

Did you try a Heatmap visualization? That might possibly work. Once you have your data split in a Heatmap you can experiment with the order of your aggregations and the options tab for it.

And there's Vega Visualizations which is part of the product and can do a LOT of things other visualizations can't, but there's a bit of learning curve to it. Let me know if the Heatmap doesn't work for you and I'll try to figure out how to do it with Vega, or find someone who can help.


(kalangara) #5

Hi Lee
I tried with Heatmap viz. but unfortunately it says "There are too many series defined."

I am very new for vega, but with some support for sure I would be able to manage it.

Regards, G


(Lee Drengenberg) #6

I thought I'd give the heatmap a shot with data like yours. I posted some docs to an index like this;

POST discuss/doc
{
  "server": "computer2",
  "application": "STU",
  "status": 1
}

Below I did a terms aggregation on server, so we see computer1 and computer2 along the x-axis (would show more if there were more).

Then I added a y-axis terms aggregation on application. This gives me each of those application values along the Y-axis.

Then I changed the metric from Count, to Max of the status field, so it would show either 1 or 0.

I went into the options and changed the range to only have 2 ranges. So it shows the light color for status 0 and the darker color for status 1.

If you do this do you get too many series? If so, whats' the scale of this data?


(kalangara) #7

Hi Lee
thanks for those inputs... we are exploring it out now, also checking your suggestion with vega. Will update when we can put something nice for our requirements.
Regards,
Ginu


(system) #8

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