uCharts Y轴格式化

1、Y轴格式化用法: yAxis: {  data:[{    calibration:true,    position:'left',    title:'折线',    titleFontSize:12,    format:(val)=>{return val.toFixed(0)+'度'}  }],  showTitl...

1、Y轴格式化用法:

yAxis: {
  data:[{
    calibration:true,
    position:'left',
    title:'折线',
    titleFontSize:12,
    format:(val)=>{return val.toFixed(0)+'度'}
  }],
  showTitle:true,
  gridType:'dash',
  dashLength:4,
  splitNumber:5
}

2、饼图类格式化

"chartData": {
  "series": [{
"name": "一班",
"data": 50
  }, {
"name": "二班",
"data": 30
  }, {
"name": "三班",
"data": 20
  }, {
"name": "四班",
"data": 18
  }, {
"name": "五班",
"data": 8
  }]
}
for(let i = 0 ;i < chartData.series.length;i++){
  chartData.series[i].format=()=>{return chartData.series[i].name+chartData.series[i].data};
}

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
admin
admin

651 篇文章

作家榜 »

  1. admin 651 文章
  2. 粪斗 185 文章
  3. 王凯 92 文章
  4. 廖雪 78 文章
  5. 牟雪峰 12 文章
  6. 李沁雪 9 文章
  7. 全易 2 文章
  8. Stevengring 0 文章