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

Data Labels missing on stacked column charts with negative values #909

Closed
jhadenfeldt opened this issue Sep 9, 2019 · 8 comments
Closed
Labels
bar issue related to bar charts bug Something isn't working datalabels

Comments

@jhadenfeldt
Copy link

Codesandbox

Here's a link showing the issue: https://codesandbox.io/s/react-basic-example-8zrui. The example uses react, but I was able to observe the issue in Vue as well.

Explanation

- What is the behavior you expect?
I expected dataLabels to be visible on the negative columns

- What is happening instead?
There are no dataLabels visible on the negative columns

- What error message are you getting?
No error message

@astronati
Copy link

+1

@junedchhipa
Copy link
Contributor

Can you please provide a minimal example? The provided example doesn't have any negative values.

@astronati
Copy link

Screenshot from 2020-01-05 17-01-53
This is an example.

Pink bar contains negative values.

@junedchhipa
Copy link
Contributor

Please provide a working codepen

@fengtan
Copy link

fengtan commented Jan 6, 2020

Here is one: https://codepen.io/fengtan/pen/mdypRmd

It looks like datalabels are missing only if all values of the series are negative. In the example above the values are [-10, -10], but if I change that to [-10, 10] then they all show up: https://codepen.io/fengtan/pen/QWwadgp

@junedchhipa junedchhipa added bug Something isn't working bar issue related to bar charts labels Jan 6, 2020
@junedchhipa
Copy link
Contributor

Thank you for the demo, will be addressed soon.

@alexxbetancourt
Copy link

alexxbetancourt commented Jan 26, 2021

Hi @junedchhipa, This issue still occurs in the current version, there are no labels on negative values. I am using version 3.23.1 from https://cdn.jsdelivr.net/npm/apexcharts
Here is a screenshot
image

here is an example with Codepen
https://codepen.io/alexxbetancourt/pen/VwKorOd

@Jarkovato
Copy link

Jarkovato commented Apr 2, 2021

Hi @junedchhipa I have the same problem as @alexxbetancourt, plz tell me if there is any solution

problem

UPD. this is solution

plotOptions: {
    bar: {
        dataLabels: {
            hideOverflowingLabels: false
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bar issue related to bar charts bug Something isn't working datalabels
Projects
None yet
Development

No branches or pull requests

7 participants