Skip to content

Latest commit

 

History

History

bpk-component-barchart

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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.