diff --git a/README.md b/README.md index 6b07b43..900d2c1 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,8 @@ const data = [ | `showLegend` | `Boolean` | `true` | Show a legend with one entry per key | | `legendPosition` | `'top'\|'bottom'\|'left'\|'right'` | `'bottom'` | Position of the legend relative to the chart | + + --- ### PieChart @@ -301,7 +303,7 @@ const data = [ ```jsx import React from 'react' -import { Timeline, ScatterPlot, Histogram, BarChart } from 'quick-charts' +import { Timeline, ScatterPlot, Histogram, BarChart, StackedBarChart } from 'quick-charts' const timelineData = Array.from({ length: 30 }, (_, i) => ({ date: new Date(2024, 2, i + 1), @@ -319,6 +321,15 @@ const barData = [ // ... ] +const stackedData = [ + { month: 'Jan', apples: 30, oranges: 20, bananas: 15 }, + { month: 'Feb', apples: 25, oranges: 30, bananas: 10 }, + { month: 'Mar', apples: 40, oranges: 15, bananas: 20 }, + { month: 'Apr', apples: 35, oranges: 25, bananas: 18 }, + { month: 'May', apples: 50, oranges: 35, bananas: 22 }, + { month: 'Jun', apples: 45, oranges: 40, bananas: 28 }, +] + const App = () => (