react-vis icon indicating copy to clipboard operation
react-vis copied to clipboard

X-Axis shows rgb values instead of actual label

Open WilliBoelke opened this issue 4 years ago • 0 comments

Hello, i encountered a problem which leads to react-vis displaying rgb values instead of the actual label. This happens when the lable is a CSS color name like "Black". I encountered the Problem when displaying statistics about different countries, that's where the "Peru" is coming from. I reproduced it by manually setting a X-Value of my data to "Black".

Reproduce the issue: Use a dataset like

const myData = [
  {x: 'Black', y: 10},
  {x: 'Peru', y: 5}
]

with a XYPlot and VertiacalBarSeries or LineSeries

Expected behavior: The tick labels on the X-Axis show Black and Peru

Actual behavior: The tick labels on the X-Axis show rgb(0, 0, 0) and rgb(205, 133, 63)

Example Here an example, it can be seen that the "Peru" label is displayed as the CSS rgb value, while the others are displayed correctly. image

WilliBoelke avatar Nov 03 '21 12:11 WilliBoelke