{"id":25883,"date":"2024-11-24T10:49:22","date_gmt":"2024-11-24T02:49:22","guid":{"rendered":"https:\/\/fwq.ai\/blog\/25883\/"},"modified":"2024-11-24T10:49:22","modified_gmt":"2024-11-24T02:49:22","slug":"echarts-%e6%8a%98%e7%ba%bf%e5%9b%be%e4%b8%ad%e5%a6%82%e4%bd%95%e5%ae%9a%e4%b9%89%e5%a4%9a%e7%a7%8d-markpoint%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/25883\/","title":{"rendered":"ECharts \u6298\u7ebf\u56fe\u4e2d\u5982\u4f55\u5b9a\u4e49\u591a\u79cd MarkPoint\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173072097212068.jpg\" class=\"aligncenter\" title=\"ECharts \u6298\u7ebf\u56fe\u4e2d\u5982\u4f55\u5b9a\u4e49\u591a\u79cd MarkPoint\uff1f\u63d2\u56fe\" alt=\"ECharts \u6298\u7ebf\u56fe\u4e2d\u5982\u4f55\u5b9a\u4e49\u591a\u79cd MarkPoint\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>echart\u6298\u7ebf\u56fe\u5b9a\u4e49\u591a\u79cdmarkpoint<\/strong><\/p>\n<p>\u5728\u4e00\u4e2a\u6298\u7ebf\u56fe\u4e2d\u7ed8\u5236MarkPoint\u53ef\u4ee5\u7528\u4e8e\u7a81\u51fa\u663e\u793a\u7279\u5b9a\u6570\u636e\u70b9\u3002MarkPoint\u53ef\u4ee5\u6709\u591a\u79cd\u7c7b\u578b\uff0c\u6bcf\u4e2a\u7c7b\u578b\u90fd\u5177\u6709\u4e0d\u540c\u7684\u542b\u4e49\u3002<\/p>\n<p><strong>\u5982\u4f55\u5b9a\u4e49\u591a\u79cdMarkPoint\uff1f<\/strong><\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7markPoint.data\u81ea\u5b9a\u4e49\u6807\u8bb0\u70b9\u3002markPoint.data\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u6570\u7ec4\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u4ee3\u8868\u4e00\u4e2aMarkPoint\u3002\u6bcf\u4e2aMarkPoint\u5143\u7d20\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4ee5\u4e0b\u5c5e\u6027\uff1a<\/p>\n<ul>\n<li>name\uff1a\u6807\u8bb0\u70b9\u7684\u540d\u79f0<\/li>\n<li>value\uff1a\u6807\u8bb0\u70b9\u5bf9\u5e94\u7684\u6570\u636e\u503c<\/li>\n<li>symbol\uff1a\u6807\u8bb0\u70b9\u7684\u5f62\u72b6\uff0c\u53ef\u4ee5\u662f&#8217;circle&#8217;\u3001&#8217;rect&#8217;\u6216\u81ea\u5b9a\u4e49\u56fe\u7247<\/li>\n<li>symbolSize\uff1a\u6807\u8bb0\u70b9\u7684\u5927\u5c0f<\/li>\n<li>label\uff1a\u6807\u8bb0\u70b9\u7684\u6807\u7b7e\uff0c\u53ef\u4ee5\u8bbe\u7f6eposition\u3001offset\u548cformatter\u5c5e\u6027<\/li>\n<li>itemStyle\uff1a\u6807\u8bb0\u70b9\u7684\u6837\u5f0f\uff0c\u53ef\u4ee5\u8bbe\u7f6ecolor\u3001borderColor\u548cborderWidth\u5c5e\u6027<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n<pre>option = {\n  series: [{\n    type: 'line',\n    data: [120, 132, 101, 134, 90, 230, 210],\n    markPoint: {\n      data: [\n        {\n          name: '\u6700\u5927\u503c',\n          value: 230,\n          symbol: 'circle',\n          symbolSize: 15,\n          label: {\n            position: 'top',\n            offset: [0, -20],\n            formatter: '{b}\n{c}'\n          },\n          itemStyle: {\n            color: 'red'\n          }\n        },\n        {\n          name: '\u6700\u5c0f\u503c',\n          value: 90,\n          symbol: 'rect',\n          symbolSize: 10,\n          label: {\n            position: 'bottom',\n            offset: [0, 20],\n            formatter: '{b}\n{c}'\n          },\n          itemStyle: {\n            color: 'green'\n          }\n        }\n      ]\n    }\n  }]\n};<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fECharts \u6298\u7ebf\u56fe\u4e2d\u5982\u4f55\u5b9a\u4e49\u591a\u79cd MarkPoint\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>echart\u6298\u7ebf\u56fe\u5b9a\u4e49\u591a\u79cdmarkpoint \u5728\u4e00\u4e2a\u6298\u7ebf\u56fe\u4e2d\u7ed8\u5236MarkPoint\u53ef\u4ee5\u7528\u4e8e\u7a81\u51fa\u663e\u793a\u7279\u5b9a\u6570\u636e\u70b9\u3002MarkPoint\u53ef\u4ee5\u6709\u591a\u79cd\u7c7b\u578b\uff0c\u6bcf\u4e2a\u7c7b\u578b\u90fd\u5177\u6709\u4e0d\u540c\u7684\u542b\u4e49\u3002 \u5982\u4f55\u5b9a\u4e49\u591a\u79cdMarkPoint\uff1f \u53ef\u4ee5\u901a\u8fc7markPoint.data\u81ea\u5b9a\u4e49\u6807\u8bb0\u70b9\u3002markPoint.data\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u6570\u7ec4\u4e2d\u7684\u6bcf\u4e2a\u5143\u7d20\u4ee3\u8868\u4e00\u4e2aMarkPoint\u3002\u6bcf\u4e2aMarkPoint\u5143\u7d20\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4ee5\u4e0b\u5c5e\u6027\uff1a name\uff1a\u6807\u8bb0\u70b9\u7684\u540d\u79f0 value\uff1a\u6807\u8bb0\u70b9\u5bf9\u5e94\u7684\u6570\u636e\u503c symbol\uff1a\u6807\u8bb0\u70b9\u7684\u5f62\u72b6\uff0c\u53ef\u4ee5\u662f&#8217;circle&#8217;\u3001&#8217;rect&#8217;\u6216\u81ea\u5b9a\u4e49\u56fe\u7247 symbolSize\uff1a\u6807\u8bb0\u70b9\u7684\u5927\u5c0f label\uff1a\u6807\u8bb0\u70b9\u7684\u6807\u7b7e\uff0c\u53ef\u4ee5\u8bbe\u7f6eposition\u3001offset\u548cformatter\u5c5e\u6027 itemStyle\uff1a\u6807\u8bb0\u70b9\u7684\u6837\u5f0f\uff0c\u53ef\u4ee5\u8bbe\u7f6ecolor\u3001borderColor\u548cborderWidth\u5c5e\u6027 \u793a\u4f8b\u4ee3\u7801\uff1a option = { series: [{ type: &#8216;line&#8217;, data: [120, 132, 101, 134, 90, 230, 210], markPoint: { data: [ { name: &#8216;\u6700\u5927\u503c&#8217;, value: 230, symbol: &#8216;circle&#8217;, symbolSize: 15, label: { position: &#8216;top&#8217;, offset: [0, -20], formatter: &#8216;{b} {c}&#8217; }, itemStyle: { color: &#8216;red&#8217; } [&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-25883","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25883","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=25883"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/25883\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=25883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=25883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=25883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}