0.4.10-alpha.0 • Published 3 years ago

@alicloud/console-pie-chart v0.4.10-alpha.0

Weekly downloads
38
License
MIT
Repository
github
Last release
3 years ago

name: console-pie-chart

zhName: 饼图

饼图API

引入方式

import { ConsolePieChart } from '@alicloud/console-chart';

示例 Demo

基本使用

MDXInstruction:importDemo:Basic

带label指标

MDXInstruction:importDemo:Label

自定义tooltip

MDXInstruction:importDemo:Tooltip

复杂Tooltip

MDXInstruction:importDemo:ComplexTooltip

配置legend

MDXInstruction:importDemo:Legend

legend在右边

通过设置Chart的右Padding和Legend的offsetY属性来控制legend的位置。

Note: 右Padding是指圆形的右边界到渲染区域的右边界。offsetY是指圆形的右边界到legend的左边界。

MDXInstruction:importDemo:LegendRight

legend tip

配置legendtip属性可开启legend悬浮提示。开启tip配置之后,可进一步配置tipFormatter属性来进行格式化tip显示内容(取值优先级:tipFormatter => itemFormatter => value

Note: legendtip属性是通过domtitle属性来进行简单实现的,只能满足简单场景。

MDXInstruction:importDemo:LegendTip

单色

MDXInstruction:importDemo:SingleColors

指定颜色

MDXInstruction:importDemo:MultiColors

基础环状图

MDXInstruction:importDemo:Circle

环间距

MDXInstruction:importDemo:CircleSlice

环状带Guide

MDXInstruction:importDemo:CircleGuide

选中状态

MDXInstruction:importDemo:Select

根据选中状态更新环内Guide

MDXInstruction:importDemo:SelectCircleGuide

配置 Config

数据列配置

属性说明类型默认值可选值
name数据列名称String--
data数据Array--

通用配置

属性说明
padding配置绘图内边距
xAxis配置x轴
yAxis配置y轴
legend配置图例
guide配置辅助元素
tooltip配置提示信息
label配置图形文本
size配置自定义大小
style配置自定义样式

专属配置

autoSort: Boolean

是否需要按照从大到小的顺序排序

cycle: Boolean

是否将饼状图转变为环状图

innerRadius: Number

内圈半径,需要配合cycle使用

sliceGap: Number

需要配合cycle使用,环图情况下,可以使用该参数来调整每个环之间的间距,数值范围0-1

select: Boolean

是否支持选中态

selectData: String

选中的数据

colors: String|Array

自定义颜色

0.4.10-alpha.0

3 years ago

0.4.9

4 years ago

0.4.8

4 years ago

0.4.7

4 years ago

0.4.6

4 years ago

0.4.5

4 years ago

0.5.0-alpha.0

4 years ago

0.4.4

4 years ago

0.4.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.2.0-alpha.0

4 years ago

0.1.0

4 years ago

0.1.0-alpha.4

4 years ago

0.1.0-beta.1

4 years ago

0.1.0-alpha.3

4 years ago