nagix / chartjs-plugin-colorschemes

Predefined color schemes for Chart.js
MIT License
271 stars 59 forks source link

Custom color schemes #15

Closed alekbless closed 4 years ago

alekbless commented 4 years ago

Should it be possible to let users define their own complete schemes? Or is the custom-Function the way to go for this?

danmana commented 4 years ago

It is possible to specify a complete theme without using the custom function. Just place your own colors array instead of the scheme name, like so:

options: {
        plugins: {
            colorschemes: {
                scheme: ['red', 'green', 'blue', 'orange', 'black', 'yellow']
            }
        }
    }