We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab2cd1d commit 97ded1aCopy full SHA for 97ded1a
frontend/src/views/chat/component/charts/Pie.ts
@@ -24,6 +24,10 @@ export class Pie extends BaseG2Chart {
24
.encode('y', y[0].value)
25
.encode('color', series[0].value)
26
.legend('color', { position: 'bottom', layout: { justifyContent: 'center' } })
27
+ .label({
28
+ position: 'outside',
29
+ text: (data: any) => `${data[series[0].value]}: ${data[y[0].value]}`,
30
+ })
31
.tooltip((data) => {
32
return { name: y[0].name, value: data[y[0].value] }
33
})
0 commit comments