vue-admin icon indicating copy to clipboard operation
vue-admin copied to clipboard

How to change colors for chart js?

Open ghost opened this issue 7 years ago • 1 comments

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

ghost avatar Jan 16 '18 16:01 ghost

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";

willpnw avatar Jan 16 '18 19:01 willpnw