# retrochart sometimes you just want a simple bar chart without the hassle. `retrochart.js` is a minimalist library for drawing bar charts on an HTML5 canvas. no dependencies, no bloat—just straightforward charting. ## usage include the script in your html: ```html ``` add a canvas element: ```html ``` initialize the chart with your data: ```javascript const data = [ { label: 'apples', value: 30 }, { label: 'bananas', value: 15 }, { label: 'cherries', value: 25 }, ]; const chart = new RetroBarChart('myChart', data); ``` ## customization you can customize the chart with options: ```javascript const options = { barColor: '#ff6347', barHoverColor: '#ffa07a', title: 'fruit sales', titleColor: '#ffffff', titleFont: '20px Arial', textColor: '#ffffff', tooltipBgColor: 'rgba(0, 0, 0, 0.7)', tooltipTextColor: '#ff6347', formatTooltip: (label, value) => `${label}: ${value} sold`, }; const chart = new RetroBarChart('myChart', data, options); ``` ## methods - `updateData(newData)` - update the chart with new data. - `updateOptions(newOptions)` - update chart options. ## full example ```html retrochart.js example ``` ## notes - no external libraries required. - handles canvas resizing and visibility changes automatically. - supports tooltips and hover effects. ## license do whatever you want with it.