apexcharts / apexcharts.js

📊 Interactive JavaScript Charts built on SVG
https://apexcharts.com
MIT License
14.05k stars 1.28k forks source link

Total data label not centered when using a stacked bar chart #4474

Closed zeux00 closed 1 month ago

zeux00 commented 1 month ago

Description

With version 3.49.1, when displaying a vertical stacked bar chart, the label for total is not correctly centered. Meanwhile, the data label are centered.

Using version 3.49.0, this issue was not present.

Steps to Reproduce

  1. Create a chart with chart type 'bar' and 'stacked = true'
  2. Add 'plotOptions.bar.dataLabels.total.enabled = true' and 'plotOptions.bar.dataLabels.position = center' options
  3. Render the chart

Expected Behavior

The total data label should be centered

Actual Behavior

The total data label appears on the right of the bar

Screenshots

image

Reproduction Link

https://codepen.io/zeux00/pen/VwOvVoR

rosco54 commented 1 month ago

@junedchhipa I will look at this.