💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
>#### 单个柱状图 ~~~ let richGroup = { offset: [10, 0], formatter: (params) => `{people|${params.seriesName}}{center|}{percentage|${params.value}%}`, rich: { people: { color: '#B3BFD2', fontSize: 14, }, center: { padding: [0, 46, 0, 23], }, percentage: { color: 'rgba(255,255,255,0.8)', fontSize: 14, }, }, }; option = { toolbox: { feature: { saveAsImage: {} } }, backgroundColor: "#0f375f", title: { text: '单个柱状图', left: 'center', top: '10px', textStyle: { color: '#ffffff' } }, xAxis: [{ show: false, data: [''], },], yAxis: [{ show: false, type: 'value', axisTick: false, // 不显示x轴的刻度 },], series: [{ name: '自费', type: 'bar', stack: 'a', data: [40.2], barWidth: '40', label: { show: true, ...richGroup, }, itemStyle: { color: '#0376DA', barBorderRadius: [0, 0, 100, 100], }, }, { name: '自负', type: 'bar', stack: 'a', data: [30.5], label: { show: true, ...richGroup, }, itemStyle: { color: '#079FD7', }, }, { name: '共付', type: 'bar', stack: 'a', data: [38.5], label: { show: true, ...richGroup, }, itemStyle: { color: '#06DAAB', barBorderRadius: [100, 100, 0, 0], }, }, ], }; ~~~ >#### 效果图 ![](https://img.kancloud.cn/82/39/8239e592fdde2b91722da1e3c4a44a96_200x450.png) <hr>