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

toggleSeries + multiple yaxis #366

Closed
lukaszflorczak opened this issue Mar 1, 2019 · 2 comments
Closed

toggleSeries + multiple yaxis #366

lukaszflorczak opened this issue Mar 1, 2019 · 2 comments

Comments

@lukaszflorczak
Copy link

Hi. I have a little problem with my chart.
I have a multiple series (A-F) with axternal navigation and toggleSeries() methods to show/hide them.

I also have two yaxis:

yaxis: [
  { seriesName: 'seriesA' },
  { seriesName: 'seriesA', show: false },
  { seriesName: 'seriesA', show: false },
  { seriesName: 'seriesA', show: false },
  { seriesName: 'seriesE', opposite: true },
  { seriesName: 'seriesE', opposite: true, show: false }
]

The problem is when I disable for example seriesA. Then I don't see left yaxis. Is there any easy way to toggle yaxis visibility too?

@junedchhipa
Copy link
Contributor

junedchhipa commented Mar 1, 2019

There is a property in y-axis called showAlways which allows you to keep the axis always visible.

yaxis: [
  { seriesName: 'seriesA', showAlways: true },
  { seriesName: 'seriesA', show: false },
  { seriesName: 'seriesA', show: false },
  { seriesName: 'seriesA', show: false },
  { seriesName: 'seriesE', opposite: true, showAlways: true },
  { seriesName: 'seriesE', opposite: true, show: false }
]

https://apexcharts.com/docs/options/yaxis/#showAlways

@lukaszflorczak
Copy link
Author

lukaszflorczak commented Mar 4, 2019

The problem is I have left y-axis for 4 sesries. And I have external navigation to switch between each series. And now If I use showAlways I can turn it off, but I can not turn it back on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants