Fonts
Chart.js General Fonts are the global font settings that can be applied in the visual chart allowing to style of the text elements. Using this setting we can customize the text element by applying options like font family, size, weight, color, and more properties. All these options are present in Chart.default.font.
General Fonts Configuration Options
Below are the configuration options for General Fonts:
- family: This option specifies the font family for the text elements in the chart. It follows the CSS font-family options like
Arial
,Helvetica
etc. - size: This option specifies the actual font size presented in px format form. By default, the size of the text is 12 px.
- style: This option is used to set the font style by customizing text into normal, italic, and oblique variants.
- weight: This option is used to control the thickness of font characters.
- lineHeight: This option determines the height of each line of text. The default height is 1.2 which can be given in number/string form.
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