var graphic =[{type:'text',left:'center',top:'center',style:{text:getPieText(pieData, currentIndex),textAlign:'center',fill:'#000',fontSize:18,fontWeight:'bold',}}];
获取文字,全称太长取前两个字(关注黑龙江!!)
functiongetPieText(data, index){var name = data[index].name.substring(0,2);if(data[index].name =='黑龙江省'){name = data[index].name.substring(0,3);}return name +((data[index].value /getTotalValue(data)*100).toFixed(2))+'%';}functiongetTotalValue(data){return data.reduce((total, current)=>{return total + current.value;},0);}
Service CRUD 接口
说明:
通用 Service CRUD 封装IService (opens new window)接口,进一步封装 CRUD 采用 get 查询单行 remove 删除 list 查询集合 page 分页 前缀命名方式区分 Mapper 层避免混淆,泛型 T 为任意实体对象建议如果存在自定义通用 Servi…
由于汉语拼音首字母也就23个,该方法利用汉字字符按拼音字母排序的特点来生成对应的拼单首字母,只需找到这23个汉语拼音首字母中分别排序在第一的汉字生成23条临时表数据用于参照,即可简单实现汉字匹配拼音首字母
CREATE FUNCTION f_GetPyAcr…