Colors
Chart.js allows color customization in the charts. For the geometric elements like lines and bars, we can set background and border colors and for the Text elements such as labels and titles, we can set the font colors.
It mainly supports three color options which are set by default.
- 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.
Charts.js General
Chart.js General Accessibility ensures the accessibility rendered on user-provided canvas elements. Users can add accessibility features like ARIA attributes or fallback content within the canvas elements. This ensures that the content of the canvas, and chart information is accessible to all the user who relies on assistive technologies.
Accessible canvas
elements
role
="img":
indicates that the canvas should be treated as an image, suitable for contexts where the canvas represents graphical content.aria-label:
provides a text description of the content or purpose of the canvas, enhancing accessibility for users who rely on screen readers.
Contact Us