Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Heapmap] using histogram, sort by value not key #34505

Open
Leaf-Lin opened this issue Apr 3, 2019 · 1 comment
Open

[Heapmap] using histogram, sort by value not key #34505

Leaf-Lin opened this issue Apr 3, 2019 · 1 comment
Labels
enhancement New value added to drive a business result Feature:Heatmap Heatmap visualization Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@Leaf-Lin
Copy link
Contributor

Leaf-Lin commented Apr 3, 2019

Describe the feature:
In the following xy data, I have all the data to be the same value (4 in this case), just x and y at various places.
Using heapmap, I can plot x y chart with buckets to be histogram field x and y.
Screen Shot 2019-04-04 at 9 24 24 am

As can be seen from the image, x-axis are all sorted by its key, but y-axis are not sorted.
I guess it's sorted by value, in which case, all the value are the same, so the order turns out to be random.

Is it possible to add options to sort by key?

This is the request body:

{
  "aggs": {
    "2": {
      "histogram": {
        "field": "x",
        "interval": 2,
        "min_doc_count": 1
      },
      "aggs": {
        "3": {
          "histogram": {
            "field": "y",
            "interval": 5,
            "min_doc_count": 1
          },
          "aggs": {
            "1": {
              "min": {
                "field": "data"
              }
            }
          }
        }
      }
    }
  },
  "size": 0,
  "_source": {
    "excludes": []
  },
  "stored_fields": [
    "*"
  ],
  "script_fields": {},
  "docvalue_fields": [],
  "query": {
    "bool": {
      "must": [
        {
          "query_string": {
            "query": "data:\"4\"",
            "analyze_wildcard": true,
            "default_field": "*"
          }
        }
      ],
      "filter": [],
      "should": [],
      "must_not": []
    }
  }
}

I've played with advanced options to add JSON input with sort to no avail.

Describe a specific use case for the feature:

It would be useful to plot xy charts.

@Leaf-Lin Leaf-Lin added the Feature:Heatmap Heatmap visualization label Apr 3, 2019
@wylieconlon wylieconlon added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Dec 16, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Heatmap Heatmap visualization Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants