victory icon indicating copy to clipboard operation
victory copied to clipboard

labelComponent not rendering when data set is only two

Open kmasila00 opened this issue 9 years ago • 2 comments

Ive come across a very specific issue. The label component isnt rendering when there are only two data points. I am attaching a label key to the data point. It seems to work fine for any other length of data points. The pictures of my graph are below.

screen shot 2017-10-17 at 3 11 43 pm screen shot 2017-10-17 at 3 11 27 pm

I tried testing this out on the Live Preview provided in the docs and its seems to work properly

screen shot 2017-10-17 at 3 44 26 pm

I am writing the component the same way.

screen shot 2017-10-17 at 3 44 55 pm

I inspected using React dev tools and it seems as though the whole element is not rendering when there are two data points.

screen shot 2017-10-17 at 3 13 28 pm screen shot 2017-10-17 at 3 13 59 pm

The top image has 4 data sets and the bottom has only two and you can see that the Victory Label component is disappearing.

Is this a bug with the library or am i doing something wrong. I appreciate any help i can get. Thank you

kmasila00 avatar Oct 17 '17 19:10 kmasila00

@kmasila00 this is very odd. I believe this is a bug in the library

boygirl avatar Oct 19 '17 20:10 boygirl

I believe this is fixed https://codesandbox.io/s/5vy6lvypln

boygirl avatar Jan 08 '18 23:01 boygirl