How do I change the text color in the legend of the nivo/pie chart?
You can set text color like this:
legends={[
{
"anchor": "top-right",
"direction": "column",
"translateY": -25,
"translateX": 100,
"itemWidth": 100,
"itemHeight": 48.2,
"symbolSize": 12,
"symbolShape": "circle",
"textColor": '#eee'
}
]}
Thank you!
On Fri, Aug 10, 2018 at 3:22 AM, Tomasz Panek notifications@github.com
wrote:
You can set text color like this:
legends={[
{
"anchor": "top-right",
"direction": "column",
"translateY": -25,
"translateX": 100,
"itemWidth": 100,
"itemHeight": 48.2,
"symbolSize": 12,
"symbolShape": "circle",
"textColor": '#eee'
}
]}—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/plouc/nivo/issues/257#issuecomment-411884753, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AaCgh1cG9J-spD1F4zUbdzrsIoiXUUo-ks5uPJnygaJpZM4VzVdX
.
If anyone finds this via Google like I did and it isn't working for them (I was using a ResponsiveLineChart - not sure if that was my issue), then maybe this will help:
legends={[
{
"anchor": "top-right",
"direction": "column",
"translateY": -25,
"translateX": 100,
"itemWidth": 100,
"itemHeight": 48.2,
"symbolSize": 12,
"symbolShape": "circle",
"itemTextColor": "#eee", // <= this worked for me in the end
},
]}
Most helpful comment
If anyone finds this via Google like I did and it isn't working for them (I was using a ResponsiveLineChart - not sure if that was my issue), then maybe this will help: