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

IE 11 legend toggle #2528

Open
vlarkovich opened this issue Nov 16, 2018 · 6 comments
Open

IE 11 legend toggle #2528

vlarkovich opened this issue Nov 16, 2018 · 6 comments
Labels
C-bug Category: This is a bug

Comments

@vlarkovich
Copy link

vlarkovich commented Nov 16, 2018

Steps to reproduce:

  1. Open any page with c3 chart in IE 11, for example area chart or pie chart
  2. Try to toggle any item on legend
  3. See the chart with hidden item
    image
    Or
    image

Expected result:
Data should not dissapear from chart.

Maybe it is because IE doesn't support display: initial css style and when api.show is called it doesn't remove display: none that was added in api.hide

.style('display', 'initial', 'important')

  • C3 version: 0.6.7
  • D3 version: 5.6.0
  • Browser: IE 11
  • OS: win10 x64
@ghost
Copy link

ghost commented Nov 28, 2018

This was already mentioned before.
[(https://github.com//issues/2486)]

Just change
.style('display', 'initial', 'important')
to
.style('display', 'block', 'important')

it works in all browsers after this

@vlarkovich
Copy link
Author

@SovietAlex, thank you, I've already fixed it locally, but I think that this bug has to be fixed in the main version of c3js, because this is a critical error.

@snakada
Copy link

snakada commented Jul 11, 2019

Hi, it might be a bit tricky, but I solved it by writing the following in CSS:

.c3-target[style*="opacity: 1"] {
    display: block !important;
}

@digEmAll
Copy link
Contributor

I agree with @vlarkovich this should be included in the main version

@panthony panthony added the C-bug Category: This is a bug label Aug 28, 2019
matthiasstein referenced this issue in conterra/mapapps-charting Nov 27, 2019
@GDFaber
Copy link
Contributor

GDFaber commented Jan 16, 2020

I'd like to make a PR ready for this, but it may take some time as this would be my first PR for this project and I have to set up a few things according to the contribution guidelines first.

@GDFaber
Copy link
Contributor

GDFaber commented Jan 16, 2020

PR at #2741

kt3k pushed a commit that referenced this issue Jan 29, 2020
* Make legend toggle work in IE11 (#2528)

* Restrict the change to Internet Explorer, keep using 'initial' for other browsers (#2528)

* Add optional parameter and unit tests for getIEVersion (#2528)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

5 participants