zl-charts-bw

0.2.66 • Public • Published

图表组件

折线图:Line
柱状图:Bar
堆积柱状图:Stacked
饼状图:Pie
环形图:Ring
面积图:Area
散点图:Scatter
气泡图:Bubble
雷达图:Radar
双Y轴图:DoubleY
仪表盘图:Gauge
地图(连续型):Map
柱状范围图:BarRange
瀑布图:Waterfall
直方图:Histogram
嵌套饼状图:NestedPie
平行关系图:ParallelPie
玫瑰图:Rose
极坐标图:Polar
百分比环图:Annular
双向图:BothWay
旭日图:Sunburst
时序图:TimeSlice
桑基图:Sankey
矩形树图:TreeMap
引用方式传config,根据不同图表要求传对应的右侧样式设置配置
import { Line, Bar } from "zl-charts-bw";
const config={
colunms:[], //指标数组
groups:[], //维度数组
source:[], //dataSource数据
lineStyle: {smooth: true, lineWidth: 1, showLabel: true},//线宽度,是否平滑,是否展示标签
showDataZoom: true, //是否展示缩略轴
showLabel: true, //是否展示标签
xAxis: {
showAxisLine: true, //是否展示x轴轴线
showAxisLabel:true //是否展示x轴标签
},
yAxis: {
showAxisLine: true, //是否展示y轴轴线
showAxisLabel:true //是否展示y轴标签
},
legendStyle:{
showLegend:true, //是否展示图例
top : 'bottom', //垂直上中下
left : 'center' //水平左中右
},
barStyle:{
barWidthType:'adapt',//是否自适应(默认自适应)
barWidth:10,//柱宽
barGap:30, //百分比 barBorderRadius:[2], //柱形圆角 },
pieStyle:{
pieColor: ,//饼状图颜色
borderWidth:1, //饼状图边宽度
borderColor:, //饼状图边颜色
radius:, //饼状图半径
},
radarStyle:{
startAngle: ,//旋转角度
radius:, //雷达图半径
},
ringStyle:{
inSideRadius:50, //环形图内半径
outSideRadius:70, //环形图外半径
ringWidth: 20, //环宽度
gaugeInSideRadius: 70, //仪表盘内半径
parallelPieinSideRadius: 35, //平行关系饼图内半径
parallelPieoutSideRadius: 70//平行关系饼图外半径
},
polarAxis:{
isShowAxisLine:false, //极轴轴线是否展示
isShowAxisLabel:false, //极轴轴标签是否展示
isShowSplitLine:false, //网格线是否展示
isShowSplitLabel:false, //网格标签是否展示
}
mapStyle: {
showLocation: true //位置标签
}, }

Readme

Keywords

Package Sidebar

Install

npm i zl-charts-bw

Weekly Downloads

1

Version

0.2.66

License

MIT

Unpacked Size

8.08 MB

Total Files

366

Last publish

Collaborators

  • zasqwhdh