提交 f7d03d17 编写于 作者: nengyuangzhang's avatar nengyuangzhang

Merge branch 'develop'

......@@ -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
......
......@@ -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
......
......@@ -84,7 +84,7 @@ const BarChart = ({
datasets: datasets
});
}
}, []);
}, [data, compareData]);
const config = {
options: {
......
......@@ -76,7 +76,7 @@ const ChartSpacesStackBar = ({ labels, inputData, costData, title, childSpaces,
datasets: dataArray
})
}
}, [])
}, [labels, inputData, costData, option])
const options = {
scales: {
x: {
......
......@@ -50,7 +50,7 @@ const CustomizeMapBox = ({Latitude, Longitude, Zoom, Geojson, t}) => {
map.current.addControl(mapboxLanguage);
}, []);
}, [t, Latitude, Longitude, Zoom]);
useEffect(() => {
var lang = language;
......@@ -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} />
......
......@@ -58,7 +58,7 @@ const LineChart = ({
};
setLineData(chartData);
}
}, []);
}, [data, option, labels]);
const config = {
options: {
......
......@@ -93,7 +93,7 @@ const MixedLineChart = ({
};
setLineData(chartData);
}
}, []);
}, [data, option, labels, options]);
const config = {
options: {
......
......@@ -111,7 +111,7 @@ const MultiTrendChart = ({
};
setLineData(chartData);
}
}, []);
}, [baseData, reportingData, option, baseLabels, reportingLabels, rates]);
const config = {
plugins: [ChartDataLabels],
......
......@@ -134,7 +134,7 @@ const MultipleLineChart = ({
setLinaLabels(labels[values[0]]);
setValues(['a0']);
setOldValues(['a0'])
}, []);
}, [data, labels, options]);
useEffect(() => {
let tempNodes = [...nodes];
......@@ -195,7 +195,7 @@ const MultipleLineChart = ({
}
setNodes(tempNodes);
setLinaLabels(labels[values[0]]);
}, []);
}, [lastMoment]);
let getOption = () => {
return {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册