How to create : Stacked bar chart with negative values

I want to create a visualization : Stacked bar chart with negative values.


Let me know if kibana supports this chart.
Thanks

Hi @HuongCV

I am checking on this... This does work "Non Stacked" In Lens.

Here is what it looks like Non Stacked

However, Stacked does not look correct (I would expect Same Line +/-) but it does not look correct so I am checking to see if there is an issue / bug,

You can use Vega but that is much more complex than Lens

Here is the data I used for this ... it does require +/- data

DELETE discuss-pos-neg

PUT discuss-pos-neg/
{
  "mappings": {
    "properties": {
      "category" : {"type": "keyword"},
      "value" : {"type": "float"}
    }
  }
}


POST discuss-pos-neg/_doc
{
      "category" : "10-20",
      "value" : 32
}

POST discuss-pos-neg/_doc
{
      "category" : "10-20",
      "value" : -45
}


POST discuss-pos-neg/_doc
{
      "category" : "20-30",
      "value" : 64
}

POST discuss-pos-neg/_doc
{
      "category" : "20-30",
      "value" : -23
}

POST discuss-pos-neg/_doc
{
      "category" : "30-40",
      "value" : 57
}

POST discuss-pos-neg/_doc
{
      "category" : "30-40",
      "value" : -33
}

GET discuss-pos-neg/_search

UPDATE : Yes there is a bug currently in the Rendering of this in Lens
Here is the opened github, unfortunately I do not have an ETA on this.

So it seems that if you need that exact Viz today you will need to use Vega, unfortunately I am not a Vega Expert.

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