Skip to content

[Bug] Problem with x-axis label alignment in histogram #19791

@pratikg1234

Description

@pratikg1234

Version

5.4.3

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=bar-histogram&lang=ts&code=PTAEGUFNNALAXeAHAzgLhAcwJb1gVwCMA6AYwHsBbYSCygM0htNgEMAneFAWhXlfgAoWm04pi7SDj6R2AFXasAdinrl2lABS1w_eMXiKVajcVjY-5TIsoBKANyDB5JPGzkloALwu3H76AA3oKgoaAARISspADW1uT4SgAmAMLkADbq4WgR4QA0IWHhkihIHijYAG6Q2aCG-JAFYRHw5BluSLXBzc3hhtiYmLK14awAHhb5hT0RKLDkAO619Y3TPX2QY_C6AJ7pNTndM-tqStvYAF4HoACMAExrzQC-TccgEeMWAArk2GfDh0eYXevXgOyQ13Cc1YSUW4SBoXeTzWLzWfTa6UI5DGXQREXYAwQtRuADZXjNwowBPhJLjjutKBwYnT6ccofMljkVnjnuTWeFGThSHJwdcjqz1nM4Tl6Kx0ihIDywqiJaFipBLLTAarJRzluwGkrQsj6SblXzwkkBKwAFptSgsilgiEjP4VJI1PkqorWbBJR3rChnVh_AAyrEIkHS-oafN6-3o8FqdwADHGigTMEScqn02rWp0cgAWNN4yLkRBUWoAVhRFsqFnwcoAsqxC6AANoAXQt-yGyQDoNFIxQpHYGWjeY-6QGShGCaTU_CuEglAAEpBCUmcjdS_Tl_BVwB1P14Yl7tmHra7faDtmnc5Xc94s3Gi1jACCExQd_zw5y4SkAIUjqDsUz7lKnIrEuVr8LUHZGhEKbgaq4Q3ChErhHcGH8gAzDh-5FgRbLVsRFIkmR6wAOyUb0AActFFAAnIxaq7vC9I9mWSisJQkKUeEPF8aG5BAX4c4AZQfpJLeU7cbxkByJs2xgre2qoQ-4CXNcNxFlOvQPkem5ZtuERYukHrsKxETVJw2BAekH4zpgEktC41nhEgMJJH8mDwYhzQlvpxwXjqoShWFKaIV2L5LkJkAAOJtrUEW9J8KDhpG0bqZhkHZNBiGARkWQAewmBRJoaagFVVU3LYHnkLZ9CZJyLQGkoYmeoV5gegA8rZ6TJTKcoKsFaqQa2YyZVGMarDq7KLM2YYRjNXIGnNGkeI-Ol6YVXlJD5Sh-TkCFhWEqWqhdEpXayUU6lx81yrO86QImlHehS6VyPZzI5fyeVrbGhVPS5J54NN2WgLK8qKqaS5YokVrsDsSXttyvJojsX6TCdeLivyzqQpUcoNB58UjB5INKN9sQ_oDG2YWUFTiS9b1jR834Q7-_IUJkVkAQAxEWAAiIsAGJi9ZvQ9ZA_WyIN7bQ6NAVFBN4xc_T7O9BNy1ZbNWtFJp2nEg8Ooffy6Whn8Yoq-Neqa7bESMmVfwpQbaozkokA3jbZ0UrzJURELovCxLHF--b80eDasjkLUSuw6qkdsqUM7wAAcvglCRvzuTs4JCkiWJ7iueEkADvn8VKdeqm-37lJbVpT47nc7sRIZxnZmZGSWeHEqvj0A8ParsjYBq_n0vj-6wawE9-zd9J0W3uFt63jsLyFbe6W3G8zLuW87zv0X587MQfpIs-HMnTr_mZHAeZB4A7NnGT64VKDP-ZTfXLvESDXrf15oAyhiNBmYVPLkGZiXEYBYpZFADrnSIg1YhwLVEbZutxTZJ3zq0do2B2yBGvpKSgbQzzDRhpXBSI50L5yDF7UgGd8DpHlG_IB_BYi6EUIeTAYEAJyknO_dhv086FSiOwSaJ4khkOqvnMRkjpFoRTCmAApNZd4kQOCo2yOEbgu4VEeRXJQH23N9wIJGMHcWktEJELSpza2JiU72zqOtax7NYp40KjPOeZ1f7NCXo7Fejs15-xkevLeu0Qm-LCPvR2NxD7r2PoVQm857GUL4iMK2XsaHvxIRWWArDUKe29rXBx_tiqIIsaHKxZt84cEgKwYxOQlBMPSC-NYMUnhAA

Steps to Reproduce

  1. Use the chart options given below to produce the histogram in e-charts.
  2. A Json file has been attached along with the issue, this file contains the options data.
    histogramOptions.json

Current Behavior

  1. On plotting the histogram using the given options, the histogram is being displayed.
  2. However, the plotted histogram is not as per expection.
  3. The histogram looks like the following
image (2)

Expected Behavior

  1. As per the given options, the histogram that should be plotted should look like the below attached image.
  2. The alignment of the labels should be w.r.t the ticks.
  3. Currently the label is aligned at the center of the plotted bar in histogram.
image (1)

Environment

- OS: Windows 11
- Browser: Chrome
- Framework: Angular

Any additional comments?

In case if the options that have been used for plotting the histogram needs to be modified, please attach the proper options data .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions