Hi,
I'm using echarts4,
about pie: trying to set the label line color to black, but it always takes the color of the fan.
Here is my code:
var myChart = echarts.init(document.getElementById('echarts-51e9bfb5cf8c602c74c30f1bc913eac9'));
var option = {
title: {
text: "Distribution des états de commande",
subtext: '',
x: 'left'
},
tooltip: {
trigger: 'item',
// formatter: "{a} <br/>{b} : {c} ({d}%)", // a is the series name
formatter: "{b} : {c} ({d}%)",
},
legend: {
orient: 'vertical',
right: 0,
data: ["En attente de paiement","En cours de pr\u00e9paration","Erreur de livraison","Paiement accept\u00e9"],
},
label: {
color: 'black',
},
labelLine: {
lineStyle: "black",
color: "black",
},
series: [
{
// name: 'coucou',
type: 'pie',
radius: '65%',
center: ['50%', '60%'],
data: [{"value":"7","name":"En attente de paiement"},{"value":"1","name":"En cours de pr\u00e9paration"},{"value":"1","name":"Erreur de livraison"},{"value":"5","name":"Paiement accept\u00e9"}],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
labelLine: {
lineStyle: 'black'
}
}
]
};
myChart.setOption(option);
As you can see on the image above, the label of each fan is black (good), but the line between
the label and the fan is always of the same color as the fan.
How can I turn it to black ?
(I ask this because I normally have some colors generated from the database, but they aren't well
readable, for instance I have some yellow which makes it hard to read, and so having all lines in black in this case would make the pie more readable).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi, I'm using echarts4, about pie: trying to set the label line color to black, but it always takes the color of the fan.
Here is my code:
As you can see on the image above, the label of each fan is black (good), but the line between the label and the fan is always of the same color as the fan. How can I turn it to black ?
(I ask this because I normally have some colors generated from the database, but they aren't well readable, for instance I have some yellow which makes it hard to read, and so having all lines in black in this case would make the pie more readable).