| | |
| | | borderWidth: 5, |
| | | borderRadius: 4, |
| | | formatter: function (params) { |
| | | return `{a|${params.name}} {b|${params.value + "%"}}`; |
| | | let label = |
| | | params.name.length > 5 |
| | | ? `${params.name.slice(0, 4)}...` |
| | | : params.name; |
| | | return `{a|${label}} {b|${params.value + "%"}}`; |
| | | }, |
| | | rich: { |
| | | a: { |
| | |
| | | labelLine: { |
| | | show: true, |
| | | length: 4, |
| | | length2: 80, |
| | | length2: 70, |
| | | lineStyle: { |
| | | color: "#dcb018", |
| | | }, |
| | |
| | | <style scoped lang="scss"> |
| | | .bar-chart { |
| | | width: 100%; |
| | | height: calc(100% - 20px); |
| | | height: calc(100% - 10px); |
| | | padding: 20px 0 0; |
| | | |
| | | .bar-contents { |