Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import {HorizontalBar, Radar, Polar,Pie, Doughnut} from 'react-chartjs-2';
- const Chart = (props) =>{
- const defaultProps = {
- displayTitle:true,
- displayLegend: false,
- }
- return (
- <div className="chart">
- <HorizontalBar
- data={props.chartData}
- options={{
- maintainAspectRatio:true,
- title:{
- display:defaultProps.displayTitle,
- text: "Population of some cool cities",
- fontSize:25
- },
- legend:{
- display:defaultProps.displayLegend,
- }
- }}
- />
- </div>
- )
- }
- export default Chart;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement