Closed CelticParser closed 5 years ago
Color schemes are modularized by e1336da. Once a new npm package (v0.4.0) is released, you will be able to import the plugin core and a particular color scheme only as ES6 modules like this:
// import the plugin core
import 'chartjs-plugin-colorschemes/src/plugins/plugin.colorschemes';
// import a particular color scheme
import { Aspect6 } from 'chartjs-plugin-colorschemes/src/colorschemes/colorschemes.office';
// ...
options: {
plugins: {
colorschemes: {
scheme: Aspect6
}
}
}
//...
Tree-shaking will work, so the size will greatly be reduced.
It will also support the original import statement.
// import the plugin core and all the color schemes
import 'chartjs-plugin-colorschemes';
// ...
options: {
plugins: {
colorschemes: {
scheme: 'office.Aspect6'
}
}
}
//...
Closing as v0.4.0 was released.
Modularizing the color schema(s) will greatly reduce the user payload.
i.e: Instead of:
Use: