Skip to content

Commit

Permalink
barometro climatico label fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sirmmo committed Oct 10, 2024
1 parent 813ce19 commit 20c561f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/app/pages/IndexPage/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,10 +271,7 @@ const Graph = (props: any) => {
};

const getLineWidth = dataset => {
return dataset.info.climatological_model === 'model_ensemble' ||
dataset.info.series_elaboration === 'ORIGINAL'
? 3
: 1;
return 3;
};

const getSelected = dataset => {
Expand Down Expand Up @@ -392,15 +389,13 @@ const Graph = (props: any) => {
"scenario": "rcp26",
"uncertainty_type": "upper_bound",
"year_period": "year"
}*/
const getName = (item, mode = 'timeseries') => {
}*/ const getName = (item, mode = 'timeseries') => {
if ('station' in item.info) mode = 'sensor';
let tdata: any = {};
for (let k in item.translations.parameter_values) {
tdata[k] = item.translations.parameter_values[k][i18n.language];
}
if (mode === 'timeseries')
return `${tdata.climatological_model} ${tdata.scenario}`;
if (mode === 'timeseries') return `${tdata.series_name} ${tdata.scenario}`;
else return `${tdata.station}`;
};

Expand Down Expand Up @@ -430,9 +425,10 @@ const Graph = (props: any) => {
selected: getSelected(item),
data: getChartData(item, timeseries),
stack: getStack(item),
step: getStepType(item),
stackStrategy: 'all',
areaStyle: getAreaStyle(item),
zLevel: getZLevel(item),
z: getZLevel(item),
label: {
formatter: '{a}-{b}:{c}',
},
Expand All @@ -447,7 +443,7 @@ const Graph = (props: any) => {
});

const titleText = `
${findValueName('variable', 'variables')}
Barometro Climatico
`;

const subText = `
Expand Down

0 comments on commit 20c561f

Please sign in to comment.