Commit ac01ef73 authored by 曹雷's avatar 曹雷

fix others

parent b7dbf211
...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
if (result.data.os.length) { if (result.data.os.length) {
result.data.os.sort((a, b) => { return b.count - a.count }) result.data.os.sort((a, b) => { return b.count - a.count })
} }
var others = { name: 'others', value: 0 }; var others = { name: '其他', value: 0 };
var t = 0; var t = 0;
for (var i = 0; i < result.data.os.length; i++) { for (var i = 0; i < result.data.os.length; i++) {
var element = result.data.os[i]; var element = result.data.os[i];
...@@ -312,14 +312,14 @@ ...@@ -312,14 +312,14 @@
dataSystem.push({ value: element.count, name: element.name }) dataSystem.push({ value: element.count, name: element.name })
} }
if (others.value) { if (others.value) {
legendSystem.push('others'); legendSystem.push('其他');
dataSystem.push(others) dataSystem.push(others)
} }
if (result.data.browser.length) { if (result.data.browser.length) {
result.data.browser.sort((a, b) => { return b.count - a.count }) result.data.browser.sort((a, b) => { return b.count - a.count })
} }
others = { name: 'others', value: 0 }; others = { name: '其他', value: 0 };
t = 0; t = 0;
for (var i = 0; i < result.data.browser.length; i++) { for (var i = 0; i < result.data.browser.length; i++) {
var element = result.data.browser[i]; var element = result.data.browser[i];
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
dataBrowser.push({ value: element.count, name: element.name }) dataBrowser.push({ value: element.count, name: element.name })
} }
if (others.value) { if (others.value) {
legendBroswer.push('others'); legendBroswer.push('其他');
dataBrowser.push(others) dataBrowser.push(others)
} }
......
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