{"id":1079,"date":"2018-08-07T01:46:05","date_gmt":"2018-08-07T01:46:05","guid":{"rendered":"http:\/\/www.ipcpu.com\/?p=1079"},"modified":"2018-11-07T01:49:43","modified_gmt":"2018-11-07T01:49:43","slug":"echarts-data-auto","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2018\/08\/echarts-data-auto\/","title":{"rendered":"echarts\u7eb5\u8f74Y\u8f74\u5355\u4f4d\u81ea\u52a8\u9002\u5e94(\u8f6c\u6362)\u5927\u5c0f"},"content":{"rendered":"

\u6211\u662f\u7528echarts\u6765\u753bCDN\u5e26\u5bbd\u56fe\u50cf\u7684\uff0c\u6211\u5e0c\u671b\u7eb5\u8f74Y\u8f74\u7684\u5355\u4f4d\u53ef\u4ee5\u6839\u636e\u5e26\u5bbd\u7684\u5927\u5c0f\u81ea\u52a8\u8c03\u8282\uff0c\u6bd4\u5982\u6211\u7684\u5e26\u5bbd\u8fbe\u5230300M\u4ee5\u540e\uff0c\u7eb5\u8f74\u5355\u4f4d\u662fM\uff0c\u5f53\u5e26\u5bbd\u8fbe\u52303G\u65f6\uff0c\u7eb5\u8f74\u5355\u4f4d\u662fG\uff0c\u7f51\u7edc\u4e0a\u627e\u4e86\u597d\u4e45\uff0c\u8bb0\u5f55\u4e00\u4e0b\u3002
\nJS\u4ee3\u7801\u5982\u4e0b\uff0c<\/p>\n

\n
      yAxis: {\r\n              type: 'value',\r\n              axisLabel: {\r\n                     formatter: function(value){\r\n                if((value\/(1024*1024*1024))>10){\r\n                    return (value\/(1024*1024*1024)).toFixed(2)+\" Gbps\";\r\n                }else if((value\/(1024*1024))>10){\r\n                    return (value\/(1024*1024)).toFixed(2)+\" Mbps\";\r\n                }else if((value\/(1024))>10){\r\n                    return (value\/(1024)).toFixed(2)+\" Kbps\";\r\n                }else{\r\n                    return value +\" bps\";\r\n                }\r\n               }\r\n              }\r\n          },\r\n<\/code><\/pre>\n<\/div>\n

\u6548\u679c\u5982\u4e0b\uff0c
\n<\/p>\n

<\/p>\n

<\/div>\n
<\/div>\n
\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n
\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n
<\/div>\n<\/div>\n

<\/wiz_tmp_tag><\/p>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » echarts\u7eb5\u8f74Y\u8f74\u5355\u4f4d\u81ea\u52a8\u9002\u5e94(\u8f6c\u6362)\u5927\u5c0f<\/a><\/p>","protected":false},"excerpt":{"rendered":"

\u6211\u662f\u7528echarts\u6765\u753bCDN\u5e26\u5bbd\u56fe\u50cf\u7684\uff0c\u6211\u5e0c\u671b\u7eb5\u8f74Y\u8f74\u7684\u5355\u4f4d\u53ef\u4ee5\u6839\u636e\u5e26\u5bbd\u7684\u5927\u5c0f\u81ea\u52a8\u8c03\u8282\uff0c\u6bd4\u5982\u6211\u7684\u5e26\u5bbd\u8fbe\u5230300M\u4ee5\u540e\uff0c\u7eb5\u8f74\u5355\u4f4d\u662fM\uff0c\u5f53\u5e26\u5bbd\u8fbe\u52303G\u65f6\uff0c\u7eb5\u8f74\u5355\u4f4d\u662fG\uff0c\u7f51\u7edc\u4e0a\u627e\u4e86\u597d\u4e45\uff0c\u8bb0\u5f55\u4e00\u4e0b\u3002 JS\u4ee3\u7801\u5982\u4e0b\uff0c yAxis: { type: ‘value’, axisLabel: { formatter: function(value){ if((value\/(1024*1024*1024))>10){ return (value\/(1024*1024*1024)).toFixed(2)+” Gbps”; }else if((value\/(1024*1024))>10){ return (value\/(1024*1024)).toFixed(2)+” Mbps”; }else if((value\/(1024))>10){ return (value\/(1024)).toFixed(2)+” Kbps”; }else{ return value +” bps”; } } } }, \u6548\u679c\u5982\u4e0b\uff0c \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def » echarts\u7eb5\u8f74Y\u8f74\u5355\u4f4d\u81ea\u52a8\u9002\u5e94(\u8f6c\u6362)\u5927\u5c0f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[180,10,12],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1079"}],"collection":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/comments?post=1079"}],"version-history":[{"count":2,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1079\/revisions"}],"predecessor-version":[{"id":1086,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1079\/revisions\/1086"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=1079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=1079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=1079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}