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 Box without styling #13

Open
satisfazm2bezes opened this issue Mar 27, 2020 · 3 comments
Open

Legend Box without styling #13

satisfazm2bezes opened this issue Mar 27, 2020 · 3 comments

Comments

@satisfazm2bezes
Copy link

Hi,

Is it possible to configure the plugin to not draw the styling on the legend?

Something like this:
image

@chasedeanda
Copy link

@nagix I have the same request. I want to add drop shadows to my line charts but that should not affect my legend. Is there a simple way to disable this for the legend?

@satisfazm2bezes
Copy link
Author

satisfazm2bezes commented Oct 10, 2020

@nagix I have the same request. I want to add drop shadows to my line charts but that should not affect my legend. Is there a simple way to disable this for the legend?

What I did was adding a new boolean option named 'legendShadow' which gives you the possibility to enable/disable shadow on legend.

And use it like this:
{ type: 'horizontalBar', label: 'Post', yAxisID: 'y-axis-left', data: dataPost, labels, fill: true, borderColor: '#5b9bd5', backgroundColor: '#5b9bd5', shadowOffsetX: 1, shadowOffsetY: 1, shadowBlur: 7, shadowColor: colorPost, legendShadow: false }

Please find it under:
https://github.com/satisfazm2bezes/chartjs-plugin-style

Hope it helps.

@vin-ni
Copy link

vin-ni commented Nov 19, 2021

@satisfazm2bezes Hello, I'm trying to port this repo to work with chartjs v3. But there are some variables that need to be updated in the code. I was trying to do that, but i have issues exporting a new version with gulp. Somehow the dist stays empty after gulp build. Do you happen to know why? Thank you!

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

3 participants