{"id":26003,"date":"2024-11-24T08:01:33","date_gmt":"2024-11-24T00:01:33","guid":{"rendered":"https:\/\/fwq.ai\/blog\/26003\/"},"modified":"2024-11-24T08:01:33","modified_gmt":"2024-11-24T00:01:33","slug":"echarts-gl-%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0-3d-%e5%9b%be%e8%a1%a8%e7%9a%84%e5%8f%91%e5%85%89%e6%95%88%e6%9e%9c%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/26003\/","title":{"rendered":"ECharts GL \u5982\u4f55\u5b9e\u73b0 3D \u56fe\u8868\u7684\u53d1\u5149\u6548\u679c\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173077345179576.jpg\" class=\"aligncenter\" title=\"ECharts GL \u5982\u4f55\u5b9e\u73b0 3D \u56fe\u8868\u7684\u53d1\u5149\u6548\u679c\uff1f\u63d2\u56fe\" alt=\"ECharts GL \u5982\u4f55\u5b9e\u73b0 3D \u56fe\u8868\u7684\u53d1\u5149\u6548\u679c\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u4f7f\u7528 echarts gl \u7ed8\u5236\u53d1\u5149\u7684 3d \u56fe\u8868<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong>\u5982\u4f55\u5728 ECharts \u4e2d\u7ed8\u5236\u7c7b\u4f3c\u4e8e\u6f14\u793a\u4e2d\u6240\u793a\u7684\u5e26\u6709\u53d1\u5149\u6548\u679c\u7684 3D \u56fe\u8868\uff1f<\/p>\n<p><strong>\u56de\u7b54\uff1a<\/strong><\/p>\n<p>\u8981\u7ed8\u5236\u5e26\u6709\u53d1\u5149\u6548\u679c\u7684 3D \u56fe\u8868\uff0c\u9700\u8981\u4f7f\u7528 ECharts \u7684\u6269\u5c55\u5e93\uff1aECharts GL\u3002ECharts GL \u662f\u4e00\u4e2a\u57fa\u4e8eWebGL\u7684ECharts \u6269\u5c55\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684 3D \u7ed8\u56fe\u529f\u80fd\u3002<\/p>\n<p><strong>\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li> <strong>\u5b89\u88c5 ECharts GL\uff1a<\/strong>\u901a\u8fc7 npm \u6216 CDN \u5b89\u88c5 ECharts GL \u5e93\u3002<\/li>\n<li> <strong>\u521b\u5efa\u56fe\u8868\u5bb9\u5668\uff1a<\/strong>\u5728 HTML \u4e2d\u521b\u5efa\u4e00\u4e2a div \u4f5c\u4e3a\u56fe\u8868\u5bb9\u5668\u3002<\/li>\n<li> <strong>\u521d\u59cb\u5316\u56fe\u8868\uff1a<\/strong>\u4f7f\u7528 ECharts.init() \u65b9\u6cd5\u521b\u5efa\u4e00\u4e2a\u56fe\u8868\u5b9e\u4f8b\u3002<\/li>\n<li> <strong>\u8bbe\u7f6e\u56fe\u8868\u7c7b\u578b\uff1a<\/strong>\u5c06\u56fe\u8868\u7c7b\u578b\u8bbe\u7f6e\u4e3a &#8220;globe&#8221; \u6216 &#8220;scatter3D&#8221;\u3002<\/li>\n<li> <strong>\u8bbe\u7f6e\u6570\u636e\uff1a<\/strong>\u63d0\u4f9b\u6570\u636e\u6e90\uff0c\u5176\u4e2d\u5305\u542b 3D \u6570\u636e\u70b9\u5750\u6807\u548c\u989c\u8272\u4fe1\u606f\u3002<\/li>\n<li> <strong>\u542f\u7528\u53d1\u5149\u6548\u679c\uff1a<\/strong>\u5728\u7cfb\u5217\u914d\u7f6e\u4e2d\u8bbe\u7f6e &#8220;emphasis&#8221; \u9009\u9879\uff0c\u5e76\u4e3a &#8220;itemStyle&#8221; \u6dfb\u52a0 &#8220;emphasis.shadowBlur&#8221; \u548c &#8220;emphasis.shadowColor&#8221; \u5c5e\u6027\u3002<\/li>\n<\/ol>\n<p><strong>\u4ee3\u7801\u793a\u4f8b\uff1a<\/strong><\/p>\n<pre>var myChart = echarts.init(document.getElementById('main'));\n\nvar option = {\n  globe: {\n    data: [\n      {\n        name: 'Beijing',\n        value: 100,\n        itemStyle: {\n          emphasis: {\n            shadowBlur: 10,\n            shadowColor: 'rgba(255, 255, 255, 0.5)'\n          }\n        }\n      }\n    ]\n  }\n};\n\nmyChart.setOption(option);<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u5177\u6709\u53d1\u5149\u6548\u679c\u7684 3D \u5730\u7403\u4eea\u3002\u53ef\u4ee5\u901a\u8fc7\u66f4\u6539 &#8220;shadowBlur&#8221; \u548c &#8220;shadowColor&#8221; \u5c5e\u6027\u503c\u6765\u8c03\u6574\u53d1\u5149\u6548\u679c\u3002<\/p>\n<p>\u8bf7\u6ce8\u610f\uff0cECharts GL \u7684\u6587\u6863\u548c\u793e\u533a\u652f\u6301\u76f8\u5bf9\u6709\u9650\u3002\u56e0\u6b64\uff0c\u5728\u4f7f\u7528\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u67d0\u4e9b\u6311\u6218\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fECharts GL \u5982\u4f55\u5b9e\u73b0 3D \u56fe\u8868\u7684\u53d1\u5149\u6548\u679c\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>\u4f7f\u7528 echarts gl \u7ed8\u5236\u53d1\u5149\u7684 3d \u56fe\u8868 \u95ee\u9898\uff1a\u5982\u4f55\u5728 ECharts \u4e2d\u7ed8\u5236\u7c7b\u4f3c\u4e8e\u6f14\u793a\u4e2d\u6240\u793a\u7684\u5e26\u6709\u53d1\u5149\u6548\u679c\u7684 3D \u56fe\u8868\uff1f \u56de\u7b54\uff1a \u8981\u7ed8\u5236\u5e26\u6709\u53d1\u5149\u6548\u679c\u7684 3D \u56fe\u8868\uff0c\u9700\u8981\u4f7f\u7528 ECharts \u7684\u6269\u5c55\u5e93\uff1aECharts GL\u3002ECharts GL \u662f\u4e00\u4e2a\u57fa\u4e8eWebGL\u7684ECharts \u6269\u5c55\u5e93\uff0c\u5b83\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684 3D \u7ed8\u56fe\u529f\u80fd\u3002 \u6b65\u9aa4\uff1a \u5b89\u88c5 ECharts GL\uff1a\u901a\u8fc7 npm \u6216 CDN \u5b89\u88c5 ECharts GL \u5e93\u3002 \u521b\u5efa\u56fe\u8868\u5bb9\u5668\uff1a\u5728 HTML \u4e2d\u521b\u5efa\u4e00\u4e2a div \u4f5c\u4e3a\u56fe\u8868\u5bb9\u5668\u3002 \u521d\u59cb\u5316\u56fe\u8868\uff1a\u4f7f\u7528 ECharts.init() \u65b9\u6cd5\u521b\u5efa\u4e00\u4e2a\u56fe\u8868\u5b9e\u4f8b\u3002 \u8bbe\u7f6e\u56fe\u8868\u7c7b\u578b\uff1a\u5c06\u56fe\u8868\u7c7b\u578b\u8bbe\u7f6e\u4e3a &#8220;globe&#8221; \u6216 &#8220;scatter3D&#8221;\u3002 \u8bbe\u7f6e\u6570\u636e\uff1a\u63d0\u4f9b\u6570\u636e\u6e90\uff0c\u5176\u4e2d\u5305\u542b 3D \u6570\u636e\u70b9\u5750\u6807\u548c\u989c\u8272\u4fe1\u606f\u3002 \u542f\u7528\u53d1\u5149\u6548\u679c\uff1a\u5728\u7cfb\u5217\u914d\u7f6e\u4e2d\u8bbe\u7f6e &#8220;emphasis&#8221; \u9009\u9879\uff0c\u5e76\u4e3a &#8220;itemStyle&#8221; \u6dfb\u52a0 &#8220;emphasis.shadowBlur&#8221; [&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-26003","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26003","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=26003"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/26003\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=26003"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=26003"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=26003"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}