Commit 7bb628bd authored by Federico's avatar Federico
Browse files

Moved barchart to function component

parent 09070dfc
......@@ -5,9 +5,8 @@ import ReactEcharts from "echarts-for-react";
export default class YearRange extends PureComponent {
getOption = () => {
return {
export default function YearRange() {
let options = {
title: {
text: "Yearly results",
left: 10
......@@ -48,16 +47,16 @@ export default class YearRange extends PureComponent {
data: [1,2,3,4,5,6],
large: true
}]
};
};
render() {
return (
<div className='container'>
<ReactEcharts
option={this.getOption()}
option={options}
style={{height: '350px', width: '100%'}}
className='bar_chart' />
</div>
);
}
)
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment