Commit 1fa1a906 by lixinming

no message

parent 34444061
......@@ -210,20 +210,22 @@ export function getMoreYChartData(title, dataMap, percent, unit ) {
let thisDataInfo = dataMap[subDataName];
let thisCount = 0;
for (let key in thisDataInfo) {
let value = parseFloat(thisDataInfo[key]);
onceData.yMaxValue = Math.max(onceData.yMaxValue, value);
onceData.yMinValue = Math.min(onceData.yMinValue, value);
onceData.total += value;
thisCount += 1;
}
onceData.yStepValue = getChartStepNumber(Math.ceil(onceData.yMaxValue - onceData.yMinValue / onceData.total));
onceData.yStepValue = getChartStepNumber(Math.ceil(onceData.yMaxValue - onceData.yMinValue) / thisCount );
let thisUnit;
if (percent) {
thisUnit = "%";
onceData.yMaxValue = 100;
onceData.yStepValue = Math.ceil(100 - onceData.yMinValue / onceData.total);
onceData.yStepValue = Math.ceil(100 - onceData.yMinValue ) / onceData.total;
}
else if (typeof unit == 'object') {
thisUnit = unit[subDataName] || "";
......
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