General Colors Configuration Options
- backgroundColor: The option is used to configure the background color for chart elements.
- borderColor: This option is used to set the color of element borders.
- borderWidth: This option is mainly used to adjust the width of element borders.
Chart.js General Colors
Chart.js General Colors mainly provides a set of vibrant appealing colors to the chart elements. Using these colors, the appearance and visuals of the chart are been enhanced, and also the data visualizations can be represented more attractively. We can specify the colors in Hexadecimal, RGB, and HSL format.
Syntax:
data: {
datasets: [{
// Example dataset configuration
data: [/* data values */],
backgroundColor: '...', // Background color
borderColor: '..., // Border color
borderWidth: ..., // Border width
}],
},
Contact Us