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

Donut/Pie issue with shown active arcs with some category #1794

Closed
panthony opened this issue Aug 5, 2016 · 2 comments
Closed

Donut/Pie issue with shown active arcs with some category #1794

panthony opened this issue Aug 5, 2016 · 2 comments

Comments

@panthony
Copy link
Contributor

panthony commented Aug 5, 2016

Not sure if it's the same issue as #1793 but with the following configuration:

var chart = c3.generate({
    data: {
        columns: [
            ['> 0', 1],
            ['== 0', 2],
            ['< 0', 3]
        ],
        type : 'donut',
        order: null,
        onclick: function (d) { console.log('click', d); },
        onmouseover: function (d) { console.log('over', d); }
    },
    color: {
      pattern: ['green', 'grey', 'red']
    }
});

If I hover the arc corresponding to > 0, the arc for < 0 is also shown as active.

Works fine if categories are 'a', 'b' or 'c' ...

The over/click events and the tooltip are ok.

See https://jsfiddle.net/mcd6ucge/131/

@panthony
Copy link
Contributor Author

It's because the active/hover state is based on the css class of the arc.

This class is generated by normalizing the category name.

The categories > 0 and < 0 are both normalized as c4-arcs--0 (> and < are replaced by -).

@panthony
Copy link
Contributor Author

Duplicate of #1687

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

1 participant