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

keep labels on edges visible #263

Open
OmranAbazid opened this issue Jul 21, 2021 · 4 comments
Open

keep labels on edges visible #263

OmranAbazid opened this issue Jul 21, 2021 · 4 comments

Comments

@OmranAbazid
Copy link

The main chart.js library tooltips always stay visible if they are at the edge of the chart diagram.
Here is an example of that:
Screenshot 2021-07-21 at 5 17 22 PM

Where if we do the same thing using this plugin, the tooltips get truncated:
Screenshot 2021-07-21 at 5 18 50 PM

It would be really great, if the tooltips changes alignment to stay visible on the edges of the screen.
This can be done automatically or using additional property.

@OmranAbazid
Copy link
Author

Here is an example:
https://jsfiddle.net/8jhzqper/

@ConstantSun
Copy link

Yes, I had a similar error, my labels were occluded on edge.
image

@ConstantSun
Copy link

@OmranAbazid You can try this solution for a quick fix:

I added "null" value to the end of array data and also to the beginning of array data, therefore, real data can be visible completely. ( the Ox axis is expanded )

image

@OmranAbazid
Copy link
Author

@OmranAbazid You can try this solution for a quick fix:

I added "null" value to the end of array data and also to the beginning of array data, therefore, real data can be visible completely. ( the Ox axis is expanded )

image

Thanks for the suggested fix. This would help to fix the truncation but line charts will still look weird with these gaps.

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

3 participants