Untitled
This example uses Chart.js 2.9.4 to render a static bar chart on a Canvas element. It displays a single dataset of four values—100, 50, 20, and 3—labeled by flight class, including Economy, First Class, Business, and Private. The chart’s title, “People travelling in a flight,” appears above the bars, and the legend is hidden. The code creates the chart by passing a canvas ID and configuration object, specifying the chart type, data labels, and visual options directly in the script.