Commit 486562f1 authored by Oleksii Savran's avatar Oleksii Savran
Browse files

Improve charts in Climate at origin

parent 161ae8ad
......@@ -29,8 +29,8 @@ const PrecipitationChart = ({ halfWidth = false, climate, t }) => {
scales: {
yAxes: [{
ticks: {
max: Math.round(maxValue + stepSize),
min: Math.round(minValue - stepSize),
max: Math.round(maxValue / stepSize) * stepSize,
min: 0,
stepSize,
},
}],
......@@ -38,7 +38,7 @@ const PrecipitationChart = ({ halfWidth = false, climate, t }) => {
};
return (
<Grid item lg={ halfWidth ? 6 : 12 } md={ 12 }>
<Grid item lg={ halfWidth ? 6 : 12 } md={ 12 } xs={ 12 }>
<div className="mb-15">
<h3 className="pt-5 ml-20"><b>{ t('accessions.climate.monthlyPrecipitation') }</b></h3>
<ColumnChart library={ chartOptions } suffix=" mm" data={ [precipitation] }/>
......
......@@ -44,7 +44,7 @@ const TemperatureChart = ({ halfWidth = false, climate, t }) => {
yAxes: [{
ticks: {
max: Math.round(maxValue + stepSize),
min: 0,
min: Math.round(minValue - stepSize),
stepSize,
},
}],
......@@ -53,7 +53,7 @@ const TemperatureChart = ({ halfWidth = false, climate, t }) => {
return (
<Grid item lg={ halfWidth ? 6 : 12 } md={ 12 }>
<Grid item lg={ halfWidth ? 6 : 12 } md={ 12 } xs={ 12 }>
<div className="mb-15">
<h3 className="pt-5 ml-20"><b>{ t('accessions.climate.monthlyTemp') }</b></h3>
<AreaChart library={ chartOptions } suffix="°C" data={ [minData, meanData, maxData] }/>
......
Markdown is supported
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