uber / react-vis

Data Visualization Components

Home Page:https://uber.github.io/react-vis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Center and TextColor DiscreteColorLegend

DanielleWeustenenk opened this issue · comments

Hey,

I'm currently making a DiscreteColorLegend and I can't figure out how to center it and how to change the text color of it. Am I missing something or is this just not implemented (yet)?

This is what I tried for the text color, but it did not work out:
<DiscreteColorLegend orientation="horizontal" height={200} width={300} items={items} style={{fill:"red", fontSize:"20px", text:{fill: "red"}}} />

These are my items:
const items = [ {title: 'A', color:"#1E3A8A", strokeWidth: 15}, {title: 'B', color: "#3B82F6", strokeWidth: 15} ];

Thankyou already! :)