Commit 1608b6ba authored by Federico's avatar Federico
Browse files

Update YearRange.js

parent 7bb628bd
import React, { PureComponent } from 'react';
import React, {PureComponent, useRef} from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { setStart, setEnd, setYears } from './yearRangeSlice';
import ReactEcharts from "echarts-for-react";
......@@ -6,6 +6,8 @@ import ReactEcharts from "echarts-for-react";
export default function YearRange() {
const chart = useRef(null);
let options = {
title: {
text: "Yearly results",
......@@ -34,7 +36,7 @@ export default function YearRange() {
},
splitArea: {
show: false
}
},
},
yAxis: {
type: 'value',
......@@ -50,9 +52,13 @@ export default function YearRange() {
};
console.log(chart)
return (
<div className='container'>
<ReactEcharts
ref={chart}
option={options}
style={{height: '350px', width: '100%'}}
className='bar_chart' />
......
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