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 name API effect moving of x axis. #150

Closed
panubear opened this issue Apr 11, 2014 · 3 comments
Closed

data name API effect moving of x axis. #150

panubear opened this issue Apr 11, 2014 · 3 comments
Labels
C-bug Category: This is a bug resolved maybe

Comments

@panubear
Copy link

Hi, I face the problem when I use chart.data.names to update legend. The top chart x axis is moving up and the second one it was moving down.

after

It seem to be that whenever we have legend more than one line something wrong with x axis happen. You can simulate my case with the code below.

var chart = c3.generate({
    data: {
        columns: [
            ['data1', 30, 200, 100, 400, 150, 250],
            ['data2', 130, 100, 140, 300, 200, 50],
            ['data3', 100, 50, 150, 200, 300, 100]              
        ],
        type: 'bar'
    }
});

setTimeout(function () {
    chart.data.names({data1: 'New long long long long long long long long long long long long long long long long long name of data1', 
        data2: 'New long long long long long long long long long long long long long long long long long name of data2', 
        data3: 'New long long long long long long long long long long long long long long long long long name of data3'});
}, 2000);
@masayuki0812
Copy link
Member

Hi, Thank you for reporting. This is a bug and I'll fix.

masayuki0812 added a commit that referenced this issue May 5, 2014
@masayuki0812
Copy link
Member

Hi @panubear , I think this issue has been fixed by the commit above. Could you check by the version 0.1.35?

@panubear
Copy link
Author

panubear commented May 6, 2014

Yes, data.name API works smooth with 0.1.35. Many thanks for your hard work.

@panubear panubear closed this as completed May 6, 2014
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 resolved maybe
Projects
None yet
Development

No branches or pull requests

2 participants