{"id":26553,"date":"2024-11-24T13:23:56","date_gmt":"2024-11-24T05:23:56","guid":{"rendered":"https:\/\/fwq.ai\/blog\/26553\/"},"modified":"2024-11-24T13:23:56","modified_gmt":"2024-11-24T05:23:56","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-echarts-%e6%9b%b2%e7%ba%bf%e5%9b%be%e4%b8%ad%e7%bb%98%e5%88%b6%e4%ba%94%e8%a7%92%e6%98%9f%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/26553\/","title":{"rendered":"\u5982\u4f55\u5728 ECharts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e94\u89d2\u661f\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173098513360810.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5728 ECharts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e94\u89d2\u661f\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5728 ECharts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e94\u89d2\u661f\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 echarts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e94\u89d2\u661f\uff1f<\/strong><\/p>\n<p>ECharts \u662f\u4e00\u4e2a\u6d41\u884c\u7684 JavaScript \u56fe\u8868\u5e93\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u521b\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u3002\u5176\u4e2d\uff0c\u66f2\u7ebf\u56fe\u662f\u4e00\u79cd\u5c55\u793a\u6570\u636e\u53d8\u5316\u8d8b\u52bf\u7684\u56fe\u8868\u3002<\/p>\n<p>\u8981\u4f7f\u7528 ECharts \u7ed8\u5236\u66f2\u7ebf\u56fe\u4e2d\u7684\u4e94\u89d2\u661f\uff0c\u53ef\u4ee5\u4f7f\u7528 markPoint \u529f\u80fd\u3002markPoint \u5141\u8bb8\u7528\u6237\u5728\u56fe\u8868\u4e2d\u6dfb\u52a0\u6807\u8bb0\uff0c\u8fd9\u4e9b\u6807\u8bb0\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5f62\u72b6\u548c\u6837\u5f0f\u3002<\/p>\n<p>\u8981\u7ed8\u5236\u4e94\u89d2\u661f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u5b9a\u4e49\u4e00\u4e2a ECharts \u9009\u9879\u5bf9\u8c61\u3002<\/li>\n<li>\n<p>\u5728 legend \u6570\u636e\u4e2d\u6dfb\u52a0\u4e94\u89d2\u661f\u7684\u56fe\u6807\uff0c\u5e76\u6307\u5b9a\u5176\u5f62\u72b6\u4e3a\u8def\u5f84\u6570\u636e\uff0c\u8def\u5f84\u6570\u636e\u5982\u4e0b\uff1a<\/p>\n<pre>M 200 200 l-40 100 100 -80 -120 0 100 80 -40 -120 -40 120z<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236  <\/li>\n<li>\u5728 markPoint \u6570\u636e\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u6807\u8bb0\uff0c\u5e76\u6307\u5b9a\u5176\u5f62\u72b6\u4e3a symbol \u4e2d\u7684\u8def\u5f84\u6570\u636e\u3002<\/li>\n<\/ol>\n<p>\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>option = {\n  title: {\n    text: 'Stacked Line'\n  },\n  legend: {\n    data: [\n      { name: 'Email', icon: 'circle' },\n      {\n        name: 'Union Ads',\n        itemStyle: {\n          color: 'red'\n        },\n        icon: 'path:\/\/M 200 200 l-40 100 100 -80 -120 0 100 80 -40 -120 -40 120z'\n      }\n    ]\n  },\n  xAxis: {\n    type: 'category',\n    boundaryGap: false,\n    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']\n  },\n  yAxis: {\n    type: 'value'\n  },\n  series: [\n    {\n      name: 'Email',\n      type: 'line',\n      data: [120, 132, 101, 134, 90, 230, 210]\n    },\n    {\n      name: 'Union Ads',\n      type: 'line',\n      markPoint: {\n        data: [\n          {\n            type: 'max'\n          }\n        ],\n        symbol:\n          'path:\/\/M 200 200 l-40 100 100 -80 -120 0 100 80 -40 -120 -40 120z',\n        symbolSize: 30,\n        symbolOffset: [0, 30],\n        itemStyle: {\n          color: 'red'\n        }\n      },\n      data: [220, 182, 191, 234, 290, 330, 310]\n    }\n  ]\n};<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4f7f\u7528\u6b64\u4ee3\u7801\uff0c\u60a8\u53ef\u4ee5\u5728 ECharts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e00\u4e2a\u4e94\u89d2\u661f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5728 ECharts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e94\u89d2\u661f\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5728 echarts \u66f2\u7ebf\u56fe\u4e2d\u7ed8\u5236\u4e94\u89d2\u661f\uff1f ECharts \u662f\u4e00\u4e2a\u6d41\u884c\u7684 JavaScript \u56fe\u8868\u5e93\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u521b\u5efa\u5404\u79cd\u7c7b\u578b\u7684\u56fe\u8868\u3002\u5176\u4e2d\uff0c\u66f2\u7ebf\u56fe\u662f\u4e00\u79cd\u5c55\u793a\u6570\u636e\u53d8\u5316\u8d8b\u52bf\u7684\u56fe\u8868\u3002 \u8981\u4f7f\u7528 ECharts \u7ed8\u5236\u66f2\u7ebf\u56fe\u4e2d\u7684\u4e94\u89d2\u661f\uff0c\u53ef\u4ee5\u4f7f\u7528 markPoint \u529f\u80fd\u3002markPoint \u5141\u8bb8\u7528\u6237\u5728\u56fe\u8868\u4e2d\u6dfb\u52a0\u6807\u8bb0\uff0c\u8fd9\u4e9b\u6807\u8bb0\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5f62\u72b6\u548c\u6837\u5f0f\u3002 \u8981\u7ed8\u5236\u4e94\u89d2\u661f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u5b9a\u4e49\u4e00\u4e2a ECharts \u9009\u9879\u5bf9\u8c61\u3002 \u5728 legend \u6570\u636e\u4e2d\u6dfb\u52a0\u4e94\u89d2\u661f\u7684\u56fe\u6807\uff0c\u5e76\u6307\u5b9a\u5176\u5f62\u72b6\u4e3a\u8def\u5f84\u6570\u636e\uff0c\u8def\u5f84\u6570\u636e\u5982\u4e0b\uff1a M 200 200 l-40 100 100 -80 -120 0 100 80 -40 -120 -40 120z \u767b\u5f55\u540e\u590d\u5236 \u5728 markPoint \u6570\u636e\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u6807\u8bb0\uff0c\u5e76\u6307\u5b9a\u5176\u5f62\u72b6\u4e3a symbol \u4e2d\u7684\u8def\u5f84\u6570\u636e\u3002 \u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a option = { title: { text: &#8216;Stacked Line&#8217; }, legend: { data: [ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-26553","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=26553"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26553\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=26553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=26553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=26553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}