Skip to content

Commit 0b77d54

Browse files
committed
update
1 parent de6dc59 commit 0b77d54

File tree

2 files changed

+11
-26
lines changed

2 files changed

+11
-26
lines changed

src/app/components/TimeSeriesDialog/TSDataContainerHistoric.tsx

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
109109
const [timeseries, setTimeseries] = useState<any>([]);
110110
const joinNames = (names: string[]) => names.filter(name => name).join(' - ');
111111
const colors = {
112-
no_processing: 'rgb(8, 145, 49)',
113-
less_smoothing: 'rgb(8, 145, 49)',
114-
moving_average_11_years: 'rgb(8, 145, 49)',
115-
mann_kendall_trend: 'rgb(9, 8, 6)',
116-
decade_aggregation: 'rgb(231,60,60)',
112+
no_processing: 'rgb(0, 0, 0)',
113+
less_smoothing: 'rgb(0, 0, 0)',
114+
moving_average_11_years: 'rgb(0, 0, 0)',
115+
mann_kendall_trend: 'rgb(178, 30, 30)',
116+
decade_aggregation: 'rgb(60, 131, 231)',
117117
};
118118

119119
const [localStart, setLocalStart] = useState<any>(0);
@@ -359,12 +359,14 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
359359
};
360360

361361
const getGraphType = dataset => {
362-
return dataset.info.processing_method === 'no_processing' ? 'bar' : 'line';
362+
return 'line';
363363
};
364364
const getStepType = dataset => {
365365
return dataset.info.processing_method === 'decade_aggregation'
366366
? 'end'
367-
: false;
367+
: dataset.info.processing_method === 'no_processing'
368+
? 'middle'
369+
: false;
368370
};
369371
const getZLevel = dataset => {
370372
return dataset.info.series_elaboration &&
@@ -592,23 +594,6 @@ const TSDataContainerHistoric = (props: TSDataContainerProps) => {
592594
itemSize: 30,
593595
left: isMobile ? 'center' : 'right',
594596
feature: {
595-
myTool1: {
596-
show: true,
597-
title: t('app.map.timeSeriesDialog.toggleUncertainty'),
598-
icon: 'path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891',
599-
onclick: () => {
600-
let uv = !uncert;
601-
setUncert(uv);
602-
603-
setFilters(processingMethod, uv);
604-
},
605-
ontouchstart: () => {
606-
console.log('touch start');
607-
},
608-
ontouchend: () => {
609-
console.log('touch end');
610-
},
611-
},
612597
saveAsImage: {
613598
name: `Serie temporale ${joinNames([
614599
currentMap.climatological_variable,

src/app/components/TimeSeriesDialog/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const TimeSeriesDialog = (props: TimeSeriesDialogProps) => {
133133
</Grid>
134134
<Grid xs={1} />
135135
<Grid xs={22}>
136-
{latLng && mode === 'forecast' && (
136+
{latLng && map_data === 'forecast' && (
137137
<TSDataContainer
138138
latLng={latLng}
139139
setIds={setIds}
@@ -149,7 +149,7 @@ const TimeSeriesDialog = (props: TimeSeriesDialogProps) => {
149149
setFilledSeries={setFilledSeries}
150150
/>
151151
)}
152-
{latLng && mode != 'forecast' && (
152+
{latLng && map_data !== 'forecast' && (
153153
<TSDataContainerHistoric
154154
latLng={latLng}
155155
setIds={setIds}

0 commit comments

Comments
 (0)