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

Labels: anchor, align, in mixed charts #15

Closed
webmeier opened this issue Nov 20, 2017 · 5 comments
Closed

Labels: anchor, align, in mixed charts #15

webmeier opened this issue Nov 20, 2017 · 5 comments

Comments

@webmeier
Copy link

webmeier commented Nov 20, 2017

Hello thank you for your plugin there is a gap by displaying labels in mixed charts looks like a bug when the axis min is not 0, the label is at the bar bottom, but the bar bottom is out of the canvas (clipped)
https://jsfiddle.net/bistok/1h4nhtq2/6/
i want to have the barlabels at the start of the bars but the start is out of canvas?

Edit(SB): fix link

@simonbrunel simonbrunel added this to the Version 0.2 milestone Nov 20, 2017
@simonbrunel
Copy link
Member

Your jsfiddle doesn't seem to reproduce your issue, can you update it to make it simpler and obvious what the problem is? (and so remove everything not related to your issue)

@simonbrunel
Copy link
Member

Thanks @webmeier (here is a even simpler jsfiddle)

@simonbrunel
Copy link
Member

I'm not sure where it should be fixed, the issue being that Chart.js creates (visual) bars always starting from the zero value, even if the scale origin is not zero, meaning that the bar base in this case is way out the canvas. So when trying to position the label on the bar with anchor: 'start' the label is naturally out of the canvas too.

@etimberg what do you think, should we try to fix it in the bar controller to make sure that bars coordinates are always within the display range? (isn't it too risky?) or should this plugin try to workaround that case?

@simonbrunel
Copy link
Member

I'm closing this issue in favor of #98, which provide a better description and solution in comments.

Thanks @webmeier for reporting this issue.

@simonbrunel
Copy link
Member

@webmeier It's finally fixed in #99 (1 year later) and will be released in v0.5.0

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

No branches or pull requests

2 participants