You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kibana 5.4.0 垂直条形图数据可视化异常问题

Fixing Missing Y-Axis Data for Max(NO_OF_DEALS) in Kibana 5.4.0 Vertical Bar Chart

Hey there, let's work through why your Y-axis isn't showing the max NO_OF_DEALS values for each EXPENSE_CODE in your bar chart. First, since you can see all your data in Discover, we know the index is healthy—so the issue is almost certainly in either your field mapping or visualization configuration.

First, Check the NO_OF_DEALS Field Type

This is the most common culprit. If Elasticsearch mapped NO_OF_DEALS as a string instead of a numeric type (like integer or long), Kibana can't calculate aggregations like "Max" on it. Here's how to verify:

  1. Go to Management > Index Patterns in Kibana.
  2. Select your deal-expense index pattern.
  3. Look for the NO_OF_DEALS field—check its type. If it says string, that's the problem.

How to Fix a Wrong Field Type

You can't modify the mapping of an existing field in Elasticsearch, so you'll need to:

  • Create a new index with a correct mapping that defines NO_OF_DEALS as a numeric type. Example mapping snippet:
    PUT new-deal-expense
    {
      "mappings": {
        "kafka-connect": {
          "properties": {
            "EXPENSE_CODE": {"type": "keyword"},
            "EXPENSE_CODE_DESCRIPTION": {"type": "text"},
            "NO_OF_DEALS": {"type": "integer"}
          }
        }
      }
    }
    
  • Re-import your data into this new index.
  • Create a new index pattern in Kibana pointing to new-deal-expense.

If the Field Type is Correct, Verify Your Visualization Configuration

Double-check these settings in your bar chart:

  1. Metrics Panel:
    • Make sure you've selected Max as the aggregation type.
    • Ensure you're picking the numeric NO_OF_DEALS field (sometimes if you have both a keyword and numeric version of a field, you'll need to select the right one).
  2. X-Axis Buckets:
    • Confirm you're using Terms aggregation on EXPENSE_CODE.
    • Optional: Set the sort order to Max(NO_OF_DEALS) (descending) to prioritize codes with higher deal counts.
  3. Time Filter:
    • Kibana defaults to the last 15 minutes. If your data is older than that, adjust the time range picker at the top of the page to include your data's timestamp.

Test with a Direct Elasticsearch Query

To rule out index issues, run this query in Kibana's Dev Tools to see if Elasticsearch can compute the max values:

GET deal-expense/_search
{
  "size": 0,
  "aggs": {
    "group_by_expense_code": {
      "terms": {
        "field": "EXPENSE_CODE"
      },
      "aggs": {
        "max_no_of_deals": {
          "max": {
            "field": "NO_OF_DEALS"
          }
        }
      }
    }
  }
}

If this returns valid max_no_of_deals values for each EXPENSE_CODE, your index is fine—focus on adjusting the Kibana visualization settings. If not, go back to fixing the field mapping.


内容的提问来源于stack exchange,提问作者Zamir Arif

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 07:59:57