admin管理员组文章数量:1406942
Im working with ant-design-chart for react, and I have problem changing any font color in the chart and I havent found any documentation to find all the options I can use for the chart config. I need to change legend and bottom label font colors of the chart that is in the picture. this is my config
{
"stack": true,
"legend": {
"style": {
"fill": "red"
},
"color": {
"title": true,
"rowPadding": 10,
"fill": "red"
},
"itemMarginBottom": 60,
"display": true,
"padding": [
10,
15,
10,
15
],
"itemSpacing": 20
},
"style": {
"padding": 10
},
"layout": {
"padding": 20
},
"interaction": {
"tooltip": {
"shared": true
}
},
"data": [
...
],
"xField": "Date",
"yField": "Count",
"colorField": "StackedBy"
}
thank you
I have tried to find it on stack overflow and use AI to help but none of the solutions worked sadly
Im working with ant-design-chart for react, and I have problem changing any font color in the chart and I havent found any documentation to find all the options I can use for the chart config. I need to change legend and bottom label font colors of the chart that is in the picture. this is my config
{
"stack": true,
"legend": {
"style": {
"fill": "red"
},
"color": {
"title": true,
"rowPadding": 10,
"fill": "red"
},
"itemMarginBottom": 60,
"display": true,
"padding": [
10,
15,
10,
15
],
"itemSpacing": 20
},
"style": {
"padding": 10
},
"layout": {
"padding": 20
},
"interaction": {
"tooltip": {
"shared": true
}
},
"data": [
...
],
"xField": "Date",
"yField": "Count",
"colorField": "StackedBy"
}
thank you
I have tried to find it on stack overflow and use AI to help but none of the solutions worked sadly
Share Improve this question edited Mar 13 at 11:23 Lin Du 103k136 gold badges334 silver badges567 bronze badges asked Mar 6 at 14:39 Gee KrialashviliGee Krialashvili 131 bronze badge1 Answer
Reset to default 0(Ant Design Chart v2.0.0) You can find the axis label config here, legend config here
const config = {
legend: {
color: {
itemLabelFill: 'red'
}
},
// ...
axis: {
x: {
labelFill: 'red'
}
}
}
本文标签: reactjsHow do you change legend and chart bar label colors in Ant Design Chart DesignStack Overflow
版权声明:本文标题:reactjs - How do you change legend and chart bar label colors in Ant Design Chart Design? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744968987a2635121.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论