vue-bulma / vue-admin

We are refactoring it, using the latest Vue and Bulma. WIP
9.44k stars 1.62k forks source link

How to change colors for chart js? #247

Open ghost opened 6 years ago

ghost commented 6 years ago

I tried following the instructions on the chartist site the sass way with no luck. How can I customize the colors for chartist using sass?

Thanks, -Will

willpnw commented 6 years ago

Sorry, not chart js, that's in the docs. Chartist is what I'm trying to configure.

How do I do this? https://gionkunz.github.io/chartist-js/getting-started.html#the-sass-way

Specifically this part:

THE SASS WAY If you like to customize your charts you can either remove the CSS fully and write your own selectors using the Chartist.js Sass mixins or you just use the Chartist.js Sass settings file to customize the look and feel of your charts.

Styling inline SVG with CSS is a breeze and you should also consider writing your own selectors for your charts and using the Sass mixins. You can read more about using the Sass mixins in the advanced section.

To customize the style of your charts using the Sass settings file you should copy the settings file to your own Sass folder.

cp bower_components/chartist/dist/scss/settings/_chartist-settings.scss styles Then just import your copy of the settings file before you import the chartist.scss file and change the settings in your copy as desired.

@import "_my-chartist-settings.scss";
@import "chartist/dist/scss/chartist.scss";