饼形图¶
饼形图¶
{% embed data=“{“url”:”https://stackblitz.com/edit/swimlane-pie-chart?embed=1&file=app/app.component.ts”,”type”:”link”,”title”:”pie-chart - StackBlitz”,”description”:”Pie Chart demo for ngx-charts”,”icon”:{“type”:”icon”,”url”:”https://c.staticblitz.com/assets/icon-664493542621427cc8adae5e8f50d632f87aaa6ea1ce5b01e9a3d05b57940a9f.png”,”aspectRatio”:0},”thumbnail”:{“type”:”thumbnail”,”url”:”https://c.staticblitz.com/assets/icon-664493542621427cc8adae5e8f50d632f87aaa6ea1ce5b01e9a3d05b57940a9f.png”,”aspectRatio”:0}}” %}
输入¶
属性 |
Ty pe |
Def aul
Val ue |
描述 |
---|---|---|---|
view |
nu mb er [] |
图表[宽度,高度]的尺寸。如果未定义,图表将适合于父容器的大小 |
|
resu lts |
ob je ct [] |
图表数据 |
|
sche me |
ob je ct |
图表的颜色方案 |
|
cust omCo lors |
ob je ct |
自定义颜色图表。用于覆盖颜色的特定值 |
|
anim atio ns |
bo ol ea n |
tru e |
使动画 |
labe ls |
bo ol ea n |
fal se |
show or hide the labels |
labe lFor matt ing |
fu nc ti on |
function that formats the label text |
|
trim Labe ls |
bo ol ea n |
tru e |
trim the labels beyond a certain maximum length |
maxL abel Leng th |
nu mb er |
10 |
maximum length of the labels. If |
lege nd |
bo ol ea n |
fal se |
显示或隐藏图例 |
lege ndTi tle |
st ri ng |
‘Le gen d’ |
图例标题 |
lege ndPo siti on |
st ri ng |
‘ri ght ’ |
图例位置 [‘right’, ‘below’] |
expl odeS lice s |
bo ol ea n |
fal se |
make the radius of each slice proportional to it’s value |
doug hnut |
bo ol ea n |
fal se |
should doughnut instead of pie slices |
arcW idth |
nu mb er |
0.2 5 |
arc width, expressed as a fraction of outer radius |
grad ient |
bo ol ea n |
fal se |
具有梯度,而不是纯色填充元件 |
acti veEn trie s |
ob je ct [] |
[] |
元素亮点 |
tool tipD isab led |
bo ol ea n |
fal se |
显示或隐藏工具提示 |
tool tipT ext |
fu nc ti on |
a function that formats the tooltip |
|
tool tipT empl ate |
Te mp la te Re f |
工具提示中要显示的自定义 ng-template |
输出¶
属性 |
描述 |
---|---|
select |
单击事件 |
activate |
元件激活事件(鼠标输入) |
deactivate |
元件去激活事件(鼠标离开) |