Skip to content

Collors

Reference

If you don't have any preference for colors, you can use the built-in Colors plugin. It will cycle through a palette of seven Chart.js brand colors:

1
2
3
.Options(o => o
    .Plugins(p => p
        .Colors(c => c.ForceOverride(true))))

Enabled

It will cycle through a palette of seven Chart.js brand colors. Default true

.Enabled(false)

ForceOverride

By default, the colors plugin only works when you initialize the chart without any colors for the border or background specified. If you want to force the colors plugin to always color your datasets, for example, when using dynamic datasets at runtime you will need to set the forceOverride option to true.

.ForceOverride(true)