{"id":189319,"date":"2022-03-05T05:09:49","date_gmt":"2022-03-04T21:09:49","guid":{"rendered":"https:\/\/www.idc.net\/help\/189319\/"},"modified":"2022-03-05T05:09:49","modified_gmt":"2022-03-04T21:09:49","slug":"%e5%90%8e%e6%b5%aa%e4%ba%91echarts%e6%95%99%e7%a8%8b%ef%bc%9atreemap%e7%88%b6%e8%8a%82%e7%82%b9%e6%a0%87%e7%ad%be","status":"publish","type":"post","link":"https:\/\/idc.net\/help\/189319\/","title":{"rendered":"\u540e\u6d6a\u4e91ECharts\u6559\u7a0b\uff1aTreemap\u7236\u8282\u70b9\u6807\u7b7e"},"content":{"rendered":"<h2>series[i]-treemap.<strong>upperLabel<\/strong><\/h2>\n<p>upperLabel&nbsp;\u7528\u4e8e\u663e\u793a\u77e9\u5f62\u7684\u7236\u8282\u70b9\u7684\u6807\u7b7e\u3002\u5f53&nbsp;upperLabel.normal.show&nbsp;\u4e3a&nbsp;true&nbsp;\u7684\u65f6\u5019\uff0c\u201c\u663e\u793a\u7236\u8282\u70b9\u6807\u7b7e\u201d\u529f\u80fd\u5f00\u542f\u3002<\/p>\n<p>\u540c&nbsp;series-treemap.label&nbsp;\u4e00\u6837\uff0cupperLabel&nbsp;\u53ef\u4ee5\u5b58\u5728\u4e8e&nbsp;series-treemap&nbsp;\u7684\u6839\u8282\u70b9\uff0c\u6216\u8005&nbsp;series-treemap.level&nbsp;\u4e2d\uff0c\u6216\u8005&nbsp;series-treemap.data&nbsp;\u7684\u6bcf\u4e2a\u6570\u636e\u9879\u4e2d\u3002<\/p>\n<p>series-treemap.label&nbsp;\u63cf\u8ff0\u7684\u662f\uff0c\u5f53\u524d\u8282\u70b9\u4e3a\u53f6\u8282\u70b9\u65f6\u6807\u7b7e\u7684\u6837\u5f0f\uff1bupperLabel&nbsp;\u63cf\u8ff0\u7684\u662f\uff0c\u5f53\u524d\u8282\u70b9\u4e3a\u975e\u53f6\u8282\u70b9\uff08\u5373\u542b\u6709\u5b50\u8282\u70b9\uff09\u65f6\u6807\u7b7e\u7684\u6837\u5f0f\u3002\uff08\u6b64\u65f6\u6807\u7b7e\u4e00\u822c\u4f1a\u88ab\u663e\u793a\u5728\u8282\u70b9\u7684\u6700\u4e0a\u90e8\uff09<\/p>\n<p>\u53c2\u89c1\uff1a<\/p>\n<p style=\"text-align: center\"><\/p>\n<p>\u70b9\u51fb\u7f16\u8f91\u5b9e\u4f8b \u300b\u300b<\/p>\n<p>\u6ce8\uff1atreemap\u4e2d&nbsp;label&nbsp;\u5c5e\u6027\u53ef\u80fd\u5728\u591a\u5904\u5730\u65b9\u5b58\u5728\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u53ef\u4ee5\u5b58\u5728\u4e8e&nbsp;sereis-treemap&nbsp;\u6839\u4e0b\uff0c\u8868\u793a\u672c\u7cfb\u5217\u5168\u5c40\u7684\u7edf\u4e00\u8bbe\u7f6e\u3002<\/li>\n<li>\u53ef\u4ee5\u5b58\u5728\u4e8e&nbsp;series-treemap.levels&nbsp;\u7684\u6bcf\u4e2a\u6570\u7ec4\u5143\u7d20\u4e2d\uff0c\u8868\u793a\u6811\u6bcf\u4e2a\u5c42\u7ea7\u7684\u7edf\u4e00\u8bbe\u7f6e\u3002<\/li>\n<li>\u5b58\u5728\u4e8e&nbsp;series-treemap.data&nbsp;\u7684\u6bcf\u4e2a\u8282\u70b9\u4e2d\uff0c\u8868\u793a\u6bcf\u4e2a\u8282\u70b9\u7684\u7279\u5b9a\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<h3>series[i]-treemap.upperLabel.<strong>normal<\/strong><\/h3>\n<p>\u5728 ECharts \u4e2d\u901a\u8fc7 normal \u72b6\u6001\u8bbe\u7f6e Treemap \u7236\u8282\u70b9\u6807\u7b7e\u3002<\/p>\n<pre><code>show<\/code><\/pre>\n<p>\u901a\u8fc7\u8be5\u5c5e\u6027\u8bbe\u7f6e\u662f\u5426\u663e\u793a Treemap \u7236\u8282\u70b9\u6807\u7b7e\uff0c\u9ed8\u8ba4\u4e3a false\u3002<\/p>\n<pre><code>position<\/code><\/pre>\n<p>\u8bbe\u7f6e\u7236\u8282\u70b9\u6807\u7b7e\u7684\u4f4d\u7f6e\u3002<\/p>\n<p>\u53ef\u9009\u503c\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>[x, y]\u901a\u8fc7\u76f8\u5bf9\u7684\u767e\u5206\u6bd4\u6216\u8005\u7edd\u5bf9\u50cf\u7d20\u503c\u8868\u793a\u6807\u7b7e\u76f8\u5bf9\u4e8e\u56fe\u5f62\u5305\u56f4\u76d2\u5de6\u4e0a\u89d2\u7684\u4f4d\u7f6e\u3002 \u793a\u4f8b\uff1a&nbsp;\n<pre><code>\/\/ \u7edd\u5bf9\u7684\u50cf\u7d20\u503c\n  position: [10, 10],\n\/\/ \u76f8\u5bf9\u7684\u767e\u5206\u6bd4\n  position: ['50%', '50%']<\/code><\/pre>\n<\/li>\n<li>'top'<\/li>\n<li>'left'<\/li>\n<li>'right'<\/li>\n<li>'bottom'<\/li>\n<li>'inside'<\/li>\n<li>'insideLeft'<\/li>\n<li>'insideRight'<\/li>\n<li>'insideTop'<\/li>\n<li>'insideBottom'<\/li>\n<li>'insideTopLeft'<\/li>\n<li>'insideBottomLeft'<\/li>\n<li>'insideTopRight'<\/li>\n<li>'insideBottomRight'<\/li>\n<\/ul>\n<p>\u53c2\u89c1\uff1alabel position\u3002<\/p>\n<pre><code>distance<\/code><\/pre>\n<p>\u8ddd\u79bb\u56fe\u5f62\u5143\u7d20\u7684\u8ddd\u79bb\uff0c\u503c\u7c7b\u578b\u4e3a number\uff0c\u9ed8\u8ba4\u503c\u4e3a 5\u3002\u5f53 position \u4e3a\u5b57\u7b26\u63cf\u8ff0\u503c\uff08\u5982&nbsp;'top'\u3001'insideRight'\uff09\u65f6\u5019\u6709\u6548\u3002<\/p>\n<p>\u53c2\u89c1\uff1alabel position\u3002<\/p>\n<pre><code>rotate<\/code><\/pre>\n<p>\u8bbe\u7f6e\u6807\u7b7e\u65cb\u8f6c\u7684\u89d2\u5ea6\u3002\u4ece -90 \u5ea6\u5230 90 \u5ea6\u3002\u6b63\u503c\u662f\u9006\u65f6\u9488\u3002<\/p>\n<p>\u53c2\u89c1\uff1alabel rotation\u3002<\/p>\n<pre><code>offset<\/code><\/pre>\n<p>\u662f\u5426\u5bf9\u6587\u5b57\u8fdb\u884c\u504f\u79fb\u3002\u9ed8\u8ba4\u4e0d\u504f\u79fb\u3002\u4f8b\u5982\uff1a[30, 40]&nbsp;\u8868\u793a\u6587\u5b57\u5728\u6a2a\u5411\u4e0a\u504f\u79fb&nbsp;30\uff0c\u7eb5\u5411\u4e0a\u504f\u79fb&nbsp;40\u3002<\/p>\n<pre><code>formatter<\/code><\/pre>\n<p>\u6807\u7b7e\u5185\u5bb9\u683c\u5f0f\u5668\uff0c\u652f\u6301\u5b57\u7b26\u4e32\u6a21\u677f\u548c\u56de\u8c03\u51fd\u6570\u4e24\u79cd\u5f62\u5f0f\uff0c\u5b57\u7b26\u4e32\u6a21\u677f\u4e0e\u56de\u8c03\u51fd\u6570\u8fd4\u56de\u7684\u5b57\u7b26\u4e32\u5747\u652f\u6301\u7528&nbsp;\\n&nbsp;\u6362\u884c\u3002<\/p>\n<p><b>\u5b57\u7b26\u4e32\u6a21\u677f<\/b>\uff1a\u6a21\u677f\u53d8\u91cf\u6709&nbsp;{a}\u3001{b}\u3001{c}\uff0c\u5206\u522b\u8868\u793a\u7cfb\u5217\u540d\uff0c\u6570\u636e\u540d\uff0c\u6570\u636e\u503c\u3002<\/p>\n<p>\u793a\u4f8b\uff1a<\/p>\n<pre><code>formatter: '{b}: {c}'<\/code><\/pre>\n<p><b>\u56de\u8c03\u51fd\u6570<\/b><\/p>\n<p>\u56de\u8c03\u51fd\u6570\u683c\u5f0f\uff1a<\/p>\n<pre><code>(params: Object|Array) =&gt; string<\/code><\/pre>\n<p>\u53c2\u6570&nbsp;params&nbsp;\u662f formatter \u9700\u8981\u7684\u5355\u4e2a\u6570\u636e\u96c6\u3002\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n<pre><code>{\n    componentType: 'series',\n    \/\/ \u7cfb\u5217\u7c7b\u578b\n    seriesType: string,\n    \/\/ \u7cfb\u5217\u5728\u4f20\u5165\u7684 option.series \u4e2d\u7684 index\n    seriesIndex: number,\n    \/\/ \u7cfb\u5217\u540d\u79f0\n    seriesName: string,\n    \/\/ \u6570\u636e\u540d\uff0c\u7c7b\u76ee\u540d\n    name: string,\n    \/\/ \u6570\u636e\u5728\u4f20\u5165\u7684 data \u6570\u7ec4\u4e2d\u7684 index\n    dataIndex: number,\n    \/\/ \u4f20\u5165\u7684\u539f\u59cb\u6570\u636e\u9879\n    data: Object,\n    \/\/ \u4f20\u5165\u7684\u6570\u636e\u503c\n    value: number|Array,\n    \/\/ \u6570\u636e\u56fe\u5f62\u7684\u989c\u8272\n    color: string,\n}<\/code><\/pre>\n<pre><code>color<\/code><\/pre>\n<p>\u8bbe\u7f6e\u6807\u7b7e\u6587\u5b57\u7684\u989c\u8272\uff0c\u9ed8\u8ba4\u503c\u4e3a #fff\u3002<\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e3a&nbsp;'auto'\uff0c\u5219\u4e3a\u89c6\u89c9\u6620\u5c04\u5f97\u5230\u7684\u989c\u8272\uff0c\u5982\u7cfb\u5217\u8272\u3002<\/p>\n<pre><code>fontStyle<\/code><\/pre>\n<p>\u7236\u8282\u70b9\u6807\u7b7e\u6587\u5b57\u5b57\u4f53\u7684\u98ce\u683c\u3002<\/p>\n<p>\u53ef\u9009\u503c\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>'normal'<\/li>\n<li>'italic'<\/li>\n<li>'oblique'<\/li>\n<\/ul>\n<pre><code>fontWeight<\/code><\/pre>\n<p>\u6587\u5b57\u5b57\u4f53\u7684\u7c97\u7ec6<\/p>\n<p>\u53ef\u9009\u503c\uff1a<\/p>\n<ul>\n<li>'normal'<\/li>\n<li>'bold'<\/li>\n<li>'bolder'<\/li>\n<li>'lighter'<\/li>\n<li>100 | 200 | 300 | 400...<\/li>\n<\/ul>\n<pre><code>fontFamily<\/code><\/pre>\n<p>\u6587\u5b57\u7684\u5b57\u4f53\u7cfb\u5217\uff0c\u9ed8\u8ba4\u503c\u4e3a sans-serif\u3002<\/p>\n<p>\u8fd8\u53ef\u4ee5\u662f 'serif' , 'monospace', 'Arial', 'Courier New', 'Microsoft YaHei', ...<\/p>\n<pre><code>fontSize<\/code><\/pre>\n<p>\u6587\u5b57\u7684\u5b57\u4f53\u5927\u5c0f\uff0c\u9ed8\u8ba4\u503c\u4e3a 12\u3002<\/p>\n<pre><code>align<\/code><\/pre>\n<p>\u6587\u5b57\u6c34\u5e73\u5bf9\u9f50\u65b9\u5f0f\uff0c\u9ed8\u8ba4\u81ea\u52a8\u3002<\/p>\n<p>\u53ef\u9009\uff1a<\/p>\n<ul>\n<li>'left'<\/li>\n<li>'center'<\/li>\n<li>'right'<\/li>\n<\/ul>\n<p>rich&nbsp;\u4e2d\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e&nbsp;align\uff0c\u5219\u4f1a\u53d6\u7236\u5c42\u7ea7\u7684&nbsp;align\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>{\n    align: right,\n    rich: {\n        a: {\n            \/\/ \u6ca1\u6709\u8bbe\u7f6e `align`\uff0c\u5219 `align` \u4e3a right\n        }\n    }\n}<\/code><\/pre>\n<pre><code>verticalAlign<\/code><\/pre>\n<p>\u6587\u5b57\u5782\u76f4\u5bf9\u9f50\u65b9\u5f0f\uff0c\u9ed8\u8ba4\u81ea\u52a8\u3002<\/p>\n<p>\u53ef\u9009\u503c\uff1a<\/p>\n<ul>\n<li>'top'<\/li>\n<li>'middle'<\/li>\n<li>'bottom'<\/li>\n<\/ul>\n<p>rich&nbsp;\u4e2d\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e&nbsp;verticalAlign\uff0c\u5219\u4f1a\u53d6\u7236\u5c42\u7ea7\u7684&nbsp;verticalAlign\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>{\n    verticalAlign: bottom,\n    rich: {\n        a: {\n            \/\/ \u6ca1\u6709\u8bbe\u7f6e `verticalAlign`\uff0c\u5219 `verticalAlign` \u4e3a bottom\n        }\n    }\n}<\/code><\/pre>\n<pre><code>lineHeight<\/code><\/pre>\n<p>\u6807\u7b7e\u884c\u9ad8\u3002<\/p>\n<p>rich&nbsp;\u4e2d\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e&nbsp;lineHeight\uff0c\u5219\u4f1a\u53d6\u7236\u5c42\u7ea7\u7684&nbsp;lineHeight\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><code>{\n    lineHeight: 56,\n    rich: {\n        a: {\n            \/\/ \u6ca1\u6709\u8bbe\u7f6e `lineHeight`\uff0c\u5219 `lineHeight` \u4e3a 56\n        }\n    }\n}<\/code><\/pre>\n<pre><code>backgroundColor<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u80cc\u666f\u8272\u3002<\/p>\n<p>\u53ef\u4ee5\u662f\u76f4\u63a5\u7684\u989c\u8272\u503c\uff0c\u4f8b\u5982\uff1a'#123234',&nbsp;'red',&nbsp;rgba(0,23,11,0.3)'\u3002<\/p>\n<p>\u53ef\u4ee5\u652f\u6301\u4f7f\u7528\u56fe\u7247\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre><code>backgroundColor: {\n    image: 'xxx\/xxx.png'\n    \/\/ \u8fd9\u91cc\u53ef\u4ee5\u662f\u56fe\u7247\u7684 URL\uff0c\n    \/\/ \u6216\u8005\u56fe\u7247\u7684 dataURI\uff0c\n    \/\/ \u6216\u8005 HTMLImageElement \u5bf9\u8c61\uff0c\n    \/\/ \u6216\u8005 HTMLCanvasElement \u5bf9\u8c61\u3002\n}<\/code><\/pre>\n<p>\u5f53\u4f7f\u7528\u56fe\u7247\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u4f7f\u7528&nbsp;width&nbsp;\u6216&nbsp;height&nbsp;\u6307\u5b9a\u9ad8\u5bbd\uff0c\u4e5f\u53ef\u4ee5\u4e0d\u6307\u5b9a\u81ea\u9002\u5e94\u3002<\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e3a&nbsp;'auto'\uff0c\u5219\u4e3a\u89c6\u89c9\u6620\u5c04\u5f97\u5230\u7684\u989c\u8272\uff0c\u5982\u7cfb\u5217\u8272\u3002<\/p>\n<pre><code>borderColor<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u8fb9\u6846\u989c\u8272\u3002<\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e3a&nbsp;'auto'\uff0c\u5219\u4e3a\u89c6\u89c9\u6620\u5c04\u5f97\u5230\u7684\u989c\u8272\uff0c\u5982\u7cfb\u5217\u8272\u3002<\/p>\n<pre><code>borderWidth<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u8fb9\u6846\u5bbd\u5ea6\u3002<\/p>\n<pre><code>borderRadius<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u5706\u89d2\u3002<\/p>\n<pre><code>padding<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u5185\u8fb9\u8ddd\u3002\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>padding: [3, 4, 5, 6]\uff1a\u8868\u793a&nbsp;[\u4e0a, \u53f3, \u4e0b, \u5de6]&nbsp;\u7684\u8fb9\u8ddd\u3002<\/li>\n<li>padding: 4\uff1a\u8868\u793a&nbsp;padding: [4, 4, 4, 4]\u3002<\/li>\n<li>padding: [3, 4]\uff1a\u8868\u793a&nbsp;padding: [3, 4, 3, 4]\u3002<\/li>\n<\/ul>\n<p>\u6ce8\u610f\uff0c\u6587\u5b57\u5757\u7684&nbsp;width&nbsp;\u548c&nbsp;height&nbsp;\u6307\u5b9a\u7684\u662f\u5185\u5bb9\u9ad8\u5bbd\uff0c\u4e0d\u5305\u542b&nbsp;padding\u3002<\/p>\n<pre><code>shadowColor<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u80cc\u666f\u9634\u5f71\u989c\u8272\u3002<\/p>\n<pre><code>shadowBlur<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u80cc\u666f\u9634\u5f71\u957f\u5ea6\u3002<\/p>\n<pre><code>shadowOffsetX<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u80cc\u666f\u9634\u5f71 X \u504f\u79fb\u3002<\/p>\n<pre><code>shadowOffsetY<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u80cc\u666f\u9634\u5f71 Y \u504f\u79fb\u3002<\/p>\n<pre><code>width<\/code><\/pre>\n<p>\u6587\u5b57\u5757\u7684\u5bbd\u5ea6\u3002\u4e00\u822c\u4e0d\u7528\u6307\u5b9a\uff0c\u4e0d\u6307\u5b9a\u5219\u81ea\u52a8\u662f\u6587\u5b57\u7684\u5bbd\u5ea6\u3002\u5728\u60f3\u505a\u8868\u683c\u9879\u6216\u8005\u4f7f\u7528\u56fe\u7247\uff08\u53c2\u89c1&nbsp;backgroundColor\uff09\u65f6\uff0c\u53ef\u80fd\u4f1a\u4f7f\u7528\u5b83\u3002<\/p>\n<p>\u6ce8\u610f\uff0c\u6587\u5b57\u5757\u7684&nbsp;width&nbsp;\u548c&nbsp;height&nbsp;\u6307\u5b9a\u7684\u662f\u5185\u5bb9\u9ad8\u5bbd\uff0c\u4e0d\u5305\u542b&nbsp;padding\u3002<\/p>\n<p>width&nbsp;\u4e5f\u53ef\u4ee5\u662f\u767e\u5206\u6bd4\u5b57\u7b26\u4e32\uff0c\u5982&nbsp;'100%'\u3002\u8868\u793a\u7684\u662f\u6240\u5728\u6587\u672c\u5757\u7684&nbsp;contentWidth\uff08\u5373\u4e0d\u5305\u542b\u6587\u672c\u5757\u7684&nbsp;padding\uff09\u7684\u767e\u5206\u4e4b\u591a\u5c11\u3002\u4e4b\u6240\u4ee5\u4ee5&nbsp;contentWidth&nbsp;\u505a\u57fa\u6570\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u6587\u672c\u7247\u6bb5\u53ea\u80fd\u57fa\u4e8e&nbsp;content box&nbsp;\u5e03\u5c40\u3002\u5982\u679c\u4ee5&nbsp;outerWidth&nbsp;\u505a\u57fa\u6570\uff0c\u5219\u767e\u5206\u6bd4\u7684\u8ba1\u7b97\u5728\u5b9e\u7528\u4e2d\u4e0d\u5177\u6709\u610f\u4e49\uff0c\u53ef\u80fd\u4f1a\u8d85\u51fa\u3002<\/p>\n<p>\u6ce8\u610f\uff0c\u5982\u679c\u4e0d\u5b9a\u4e49&nbsp;rich&nbsp;\u5c5e\u6027\uff0c\u5219\u4e0d\u80fd\u6307\u5b9a&nbsp;width&nbsp;\u548c&nbsp;height\u3002<\/p>\n<pre><code>height<\/code><\/pre>\n<p>\u7236\u8282\u70b9\u6807\u7b7e\u533a\u7684\u9ad8\u5ea6\uff0c\u9ed8\u8ba4\u4e3a 20\u3002<\/p>\n<pre><code>textBorderColor<\/code><\/pre>\n<p>\u6587\u5b57\u672c\u8eab\u7684\u63cf\u8fb9\u989c\u8272\u3002<\/p>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e3a&nbsp;'auto'\uff0c\u5219\u4e3a\u89c6\u89c9\u6620\u5c04\u5f97\u5230\u7684\u989c\u8272\uff0c\u5982\u7cfb\u5217\u8272\u3002<\/p>\n<pre><code>textBorderWidth<\/code><\/pre>\n<p>\u6587\u5b57\u672c\u8eab\u7684\u63cf\u8fb9\u5bbd\u5ea6\u3002<\/p>\n<pre><code>textShadowColor<\/code><\/pre>\n<p>\u6587\u5b57\u672c\u8eab\u7684\u9634\u5f71\u989c\u8272\u3002<\/p>\n<pre><code>textShadowBlur<\/code><\/pre>\n<p>\u6587\u5b57\u672c\u8eab\u7684\u9634\u5f71\u957f\u5ea6\u3002<\/p>\n<pre><code>textShadowOffsetX<\/code><\/pre>\n<p>\u6587\u5b57\u672c\u8eab\u7684\u9634\u5f71 X \u504f\u79fb\u3002<\/p>\n<pre><code>textShadowOffsetY<\/code><\/pre>\n<p>\u6587\u5b57\u672c\u8eab\u7684\u9634\u5f71 Y \u504f\u79fb\u3002<\/p>\n<pre><code>rich<\/code><\/pre>\n<p>\u5728&nbsp;rich&nbsp;\u91cc\u9762\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5bcc\u6587\u672c\u6837\u5f0f\u3002\u5229\u7528\u5bcc\u6587\u672c\u6837\u5f0f\uff0c\u53ef\u4ee5\u5728\u6807\u7b7e\u4e2d\u505a\u51fa\u975e\u5e38\u4e30\u5bcc\u7684\u6548\u679c\u3002<\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre><code>label: {\n    normal: {\n\n        \/\/ \u5728\u6587\u672c\u4e2d\uff0c\u53ef\u4ee5\u5bf9\u90e8\u5206\u6587\u672c\u91c7\u7528 rich \u4e2d\u5b9a\u4e49\u6837\u5f0f\u3002\n        \/\/ \u8fd9\u91cc\u9700\u8981\u5728\u6587\u672c\u4e2d\u4f7f\u7528\u6807\u8bb0\u7b26\u53f7\uff1a\n        \/\/ `{styleName|text content text content}` \u6807\u8bb0\u6837\u5f0f\u540d\u3002\n        \/\/ \u6ce8\u610f\uff0c\u6362\u884c\u4ecd\u662f\u4f7f\u7528 '\\n'\u3002\n        formatter: [\n            '{a|\u8fd9\u6bb5\u6587\u672c\u91c7\u7528\u6837\u5f0fa}',\n            '{b|\u8fd9\u6bb5\u6587\u672c\u91c7\u7528\u6837\u5f0fb}\u8fd9\u6bb5\u7528\u9ed8\u8ba4\u6837\u5f0f{x|\u8fd9\u6bb5\u7528\u6837\u5f0fx}'\n        ].join('\\n'),\n\n        rich: {\n            a: {\n                color: 'red',\n                lineHeight: 10\n            },\n            b: {\n                backgroundColor: {\n                    image: 'xxx\/xxx.jpg'\n                },\n                height: 40\n            },\n            x: {\n                fontSize: 18,\n                fontFamily: 'Microsoft YaHei',\n                borderColor: '#449933',\n                borderRadius: 4\n            },\n            ...\n        }\n    }\n}<\/code><\/pre>\n<p>\u8be6\u60c5\u53c2\u89c1\u6559\u7a0b\uff1a\u5bcc\u6587\u672c\u6807\u7b7e<\/p>\n<pre><code>ellipsis<\/code><\/pre>\n<p>\u5f53\u6587\u5b57\u8d85\u51fa\u7684\u65f6\u5019\uff0c\u662f\u5426\u8d85\u51fa\u90e8\u5206\u66ff\u6362\u4e3a\u7701\u7565\u53f7\uff0c\u9ed8\u8ba4\u4e3a true\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>series[i]-treemap.upperLabel upperLabel&nbsp;\u7528\u4e8e\u663e\u793a\u77e9\u5f62\u7684\u7236\u8282\u70b9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":189320,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61],"tags":[],"class_list":["post-189319","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website"],"_links":{"self":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/189319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/comments?post=189319"}],"version-history":[{"count":0,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/posts\/189319\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media\/189320"}],"wp:attachment":[{"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/media?parent=189319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/categories?post=189319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idc.net\/help\/wp-json\/wp\/v2\/tags?post=189319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}