{"id":1353,"date":"2018-04-29T07:04:23","date_gmt":"2018-04-29T07:04:23","guid":{"rendered":"https:\/\/www.ipcpu.com\/?p=1353"},"modified":"2021-01-29T08:10:29","modified_gmt":"2021-01-29T08:10:29","slug":"echarts-color","status":"publish","type":"post","link":"https:\/\/c.ipcpu.com\/2018\/04\/echarts-color\/","title":{"rendered":"echarts\u8c03\u8272\u76d8"},"content":{"rendered":"

\u8c03\u8272\u76d8\uff0c\u53ef\u4ee5\u5728 option \u4e2d\u8bbe\u7f6e\u3002\u5b83\u7ed9\u5b9a\u4e86\u4e00\u7ec4\u989c\u8272\uff0c\u56fe\u5f62\u3001\u7cfb\u5217\u4f1a\u81ea\u52a8\u4ece\u5176\u4e2d\u9009\u62e9\u989c\u8272\u3002 \u53ef\u4ee5\u8bbe\u7f6e\u5168\u5c40\u7684\u8c03\u8272\u76d8\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u7cfb\u5217\u81ea\u5df1\u4e13\u5c5e\u7684\u8c03\u8272\u76d8\u3002<\/p>\n

\n
option = {\n    \/\/ \u5168\u5c40\u8c03\u8272\u76d8\u3002\n    color: ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],\n\n    series: [{\n        type: 'bar',\n        \/\/ \u6b64\u7cfb\u5217\u81ea\u5df1\u7684\u8c03\u8272\u76d8\u3002\n        color: ['#dd6b66','#759aa0','#e69d87','#8dc1a9','#ea7e53','#eedd78','#73a373','#73b9bc','#7289ab', '#91ca8c','#f49f42'],\n        ...\n    }, {\n        type: 'pie',\n        \/\/ \u6b64\u7cfb\u5217\u81ea\u5df1\u7684\u8c03\u8272\u76d8\u3002\n        color: ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C','#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF'],\n        ...\n    }]\n}<\/code><\/pre>\n<\/div>\n

\u53c2\u8003\u8d44\u6599<\/h2>\n

https:\/\/echarts.apache.org\/zh\/tutorial.html#ECharts%20%E4%B8%AD%E7%9A%84%E6%A0%B7%E5%BC%8F%E7%AE%80%E4%BB%8B<\/a><\/p>\n

\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def<\/a> » echarts\u8c03\u8272\u76d8<\/a><\/p>","protected":false},"excerpt":{"rendered":"

\u8c03\u8272\u76d8\uff0c\u53ef\u4ee5\u5728 option \u4e2d\u8bbe\u7f6e\u3002\u5b83\u7ed9\u5b9a\u4e86\u4e00\u7ec4\u989c\u8272\uff0c\u56fe\u5f62\u3001\u7cfb\u5217\u4f1a\u81ea\u52a8\u4ece\u5176\u4e2d\u9009\u62e9\u989c\u8272\u3002 \u53ef\u4ee5\u8bbe\u7f6e\u5168\u5c40\u7684\u8c03\u8272\u76d8\uff0c\u4e5f\u53ef\u4ee5\u8bbe\u7f6e\u7cfb\u5217\u81ea\u5df1\u4e13\u5c5e\u7684\u8c03\u8272\u76d8\u3002 option = { \/\/ \u5168\u5c40\u8c03\u8272\u76d8\u3002 color: [‘#c23531′,’#2f4554’, ‘#61a0a8’, ‘#d48265’, ‘#91c7ae’,’#749f83′, ‘#ca8622’, ‘#bda29a’,’#6e7074′, ‘#546570’, ‘#c4ccd3’], series: [{ type: ‘bar’, \/\/ \u6b64\u7cfb\u5217\u81ea\u5df1\u7684\u8c03\u8272\u76d8\u3002 color: [‘#dd6b66′,’#759aa0′,’#e69d87′,’#8dc1a9′,’#ea7e53′,’#eedd78′,’#73a373′,’#73b9bc’,’#7289ab’, ‘#91ca8c’,’#f49f42′], … }, { type: ‘pie’, \/\/ \u6b64\u7cfb\u5217\u81ea\u5df1\u7684\u8c03\u8272\u76d8\u3002 color: [‘#37A2DA’, ‘#32C5E9’, ‘#67E0E3’, ‘#9FE6B8’, ‘#FFDB5C’,’#ff9f7f’, ‘#fb7293’, ‘#E062AE’, ‘#E690D1’, ‘#e7bcf3’, ‘#9d96f5’, ‘#8378EA’, ‘#96BFFF’], … }] } \u53c2\u8003\u8d44\u6599 https:\/\/echarts.apache.org\/zh\/tutorial.html#ECharts%20%E4%B8%AD%E7%9A%84%E6%A0%B7%E5%BC%8F%E7%AE%80%E4%BB%8B \u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1aIPCPU-\u7f51\u7edc\u4e4b\u8def » echarts\u8c03\u8272\u76d8<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[180],"_links":{"self":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1353"}],"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=1353"}],"version-history":[{"count":1,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1353\/revisions"}],"predecessor-version":[{"id":1354,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/posts\/1353\/revisions\/1354"}],"wp:attachment":[{"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/media?parent=1353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/categories?post=1353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c.ipcpu.com\/wp-json\/wp\/v2\/tags?post=1353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}