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

Legend step is not working when change legend text font-size #2840

Open
ektadesai22 opened this issue Jun 22, 2021 · 0 comments
Open

Legend step is not working when change legend text font-size #2840

ektadesai22 opened this issue Jun 22, 2021 · 0 comments

Comments

@ektadesai22
Copy link

  • C3 version: 0.7.20
  • D3 version:
  • Browser: Chrome
  • OS: Windows

There is dependency of font-size to calculate step in updateValues(). It should not be depend on font-size of legend text.
Default is 12px and when I changed it to 10px, steps did not work as expected.

image

var chart = c3.generate({
    data: {
        columns: [
            ['data1', 30, 200, 100, 400, 150, 250],
            ['data2', 50, 20, 10, 40, 15, 25],
            ['data3', 30, 34, 100, 440, 100, 220],
            ['data4', 50, 20, 9, 40, 75, 30],
            ['data5', 150, 18, 9, 40, 75, 30],
        ]
    },
    legend: {
        position: 'inset',
        inset: {
            step: 3
        }
    }
});

To fix this I have made below changes to work step as expected.
image
image

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