Backpack bar chart component.
Check the main Readme for a complete installation guide.
import BpkBarchart from '@skyscanner/backpack-web/bpk-component-barchart';
const priceData = [
{
day: 'mon',
price: 240,
},
// ...
];
export default () => (
<BpkBarchart
xAxisLabel="Weekday"
yAxisLabel="Price (£)"
xScaleDataKey="day"
yScaleDataKey="price"
initialWidth={500}
initialHeight={300}
data={priceData}
/>
);
Check out the full list of props on Skyscanner's design system documentation website.