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

multiple lines added to a stack bar chart also stack #2076

Closed
elliotashton opened this issue Nov 28, 2020 · 2 comments
Closed

multiple lines added to a stack bar chart also stack #2076

elliotashton opened this issue Nov 28, 2020 · 2 comments

Comments

@elliotashton
Copy link

Bug report

When adding multiple lines to an existing stack bar chart, the lines are also stacked rather than being expressed independently. That is, where line series 1 has a value of 10 and line series 2 has a value of 5 series 2 will be plotted at 15, not 5.

A secondary issue for lines is where there is not a value for a data point the line chart is unable to connect to the next data point requiring the addition of an intermediary data point (which is incorrect for the purpose of the chart). It would be preferable to be able to in/exclude connections where null values exist (refer dashed line in CodePen).

I suspect the ability to specify the type and subtype (i.e. stacked, continuous line, etc) at the series level is the answer.

Codepen

https://codepen.io/testmetestme/pen/vYKrBGY

Explanation

  • What is the behavior you expect?
    I'm trying to add non stacked lines to a stacked bar chart. A single line is fine, however the addition of a second line stacks rather than being drawn

  • What is happening instead?
    The line series of the chart are also being stacked (note that the chart is globally designated as being stacked) and the line series cannot be made to have a continuous line where there is a null value.

  • What error message are you getting?
    No error message as it works as designed. This can be worked around by calculating the line series values to achieve the placement, however the tooltips will be incorrect.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@iameddz
Copy link

iameddz commented Jul 7, 2022

This issue is still present. #907

iameddz pushed a commit to iameddz/apexcharts.js that referenced this issue Nov 8, 2022
- mixed chart with stacked bars and line series - incorrect line draw apexcharts#907 (apexcharts#907)
- multiple lines added to a stack bar chart also stack apexcharts#2076 (apexcharts#2076)

New Feature:
- hide 0-values in shared tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants