Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 757 Bytes

File metadata and controls

37 lines (28 loc) · 757 Bytes

bpk-component-barchart

Backpack bar chart component.

Installation

Check the main Readme for a complete installation guide.

Usage

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}
  />
);

Props

Check out the full list of props on Skyscanner's design system documentation website.