JS Bin
✓ Published0🌍 Public
This example generates a bar chart of happiness scores for six countries using the c3 library, which is built on D3.js v5. The chart is bound to a DOM element with the class "chart" via the `c3.generate` method, and it displays categorical country labels on the x-axis and numerical happiness scores on the y-axis. Bars are rendered in black with a legend, and the data is explicitly loaded again through the `chart.load` API. The visualization demonstrates how to quickly create a static bar chart with custom colors, axes labels, and multiple data-binding steps using c3’s high-level interface.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed