Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nengyuanzhang committed Feb 19, 2024
2 parents b9eb079 + 0ec5951 commit f7d03d1
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- updated space export, import and clone functions in myems-api

### Fixed
- None
- fixed chart issues in myems-web

### Removed
- None
Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/common/AMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const CustomizeMap = ({Latitude, Longitude, Zoom,t}) => {
.catch(e => {
console.log(e);
});
}, []);
}, [t, Latitude, Longitude, zoom]);

return (
// Initialize map container, use div tag as the map container, and assign an id attribute to the div
Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/common/BarChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const BarChart = ({
datasets: datasets
});
}
}, []);
}, [data, compareData]);

const config = {
options: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const ChartSpacesStackBar = ({ labels, inputData, costData, title, childSpaces,
datasets: dataArray
})
}
}, [])
}, [labels, inputData, costData, option])
const options = {
scales: {
x: {
Expand Down
4 changes: 2 additions & 2 deletions myems-web/src/components/MyEMS/common/CustomizeMapBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const CustomizeMapBox = ({Latitude, Longitude, Zoom, Geojson, t}) => {

map.current.addControl(mapboxLanguage);

}, []);
}, [t, Latitude, Longitude, Zoom]);

useEffect(() => {
var lang = language;
Expand Down Expand Up @@ -192,7 +192,7 @@ const CustomizeMapBox = ({Latitude, Longitude, Zoom, Geojson, t}) => {
});
});
}
}, [])
}, [language, Geojson])

return (
<div id="container" className="map" style={{width:'100%', height: '100%'}} ref={mapContainer} />
Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/common/LineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const LineChart = ({
};
setLineData(chartData);
}
}, []);
}, [data, option, labels]);

const config = {
options: {
Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/common/MixedLineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const MixedLineChart = ({
};
setLineData(chartData);
}
}, []);
}, [data, option, labels, options]);

const config = {
options: {
Expand Down
2 changes: 1 addition & 1 deletion myems-web/src/components/MyEMS/common/MultiTrendChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const MultiTrendChart = ({
};
setLineData(chartData);
}
}, []);
}, [baseData, reportingData, option, baseLabels, reportingLabels, rates]);

const config = {
plugins: [ChartDataLabels],
Expand Down
4 changes: 2 additions & 2 deletions myems-web/src/components/MyEMS/common/MultipleLineChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const MultipleLineChart = ({
setLinaLabels(labels[values[0]]);
setValues(['a0']);
setOldValues(['a0'])
}, []);
}, [data, labels, options]);

useEffect(() => {
let tempNodes = [...nodes];
Expand Down Expand Up @@ -195,7 +195,7 @@ const MultipleLineChart = ({
}
setNodes(tempNodes);
setLinaLabels(labels[values[0]]);
}, []);
}, [lastMoment]);

let getOption = () => {
return {
Expand Down

0 comments on commit f7d03d1

Please sign in to comment.