Warning: Failed prop type: Invalid prop `range` supplied to `VictoryBar`

151 views Asked by At

I'm using Victory Bar with React native, and I'm VERY confused with what's happening. I'm receiving the following error:

Warning: Failed prop type: Invalid prop `range` supplied to `VictoryBar`.
    at VictoryBar
    in VictoryStackBase (created by VictoryStack)

I have the following code:

<VictoryStack
                horizontal={true}
                width={310}
                height={90}
                alignment="start"
                colorScale={graphicColorDeploy}
                style={{
                  justifyContent: 'flex-start',
                  alignItems: 'flex-start',
                  backgroundColor: '#a00',
                }}
                padding={{ top: 80, bottom: 10, left: 0 }}
              >
                
                  <VictoryBar
                    alignment="start"
                    height={40}
                    barWidth={38}
                    domain={{ x: [0, 3], y: [0, maxCtLtLtaChart] }}
                    cornerRadius={{ topLeft: 5, topRight: 5 }}
                    data={[wantedGraphicDataDeployCt[0]]}
                    events={[
                      {
                        target: 'data',
                        eventHandlers: {
                          onPressIn: () => {
                            return [
                              {
                                target: 'data',
                                mutation: dataProps => {
                                  return {};
                                },
                              },
                            ];
                          },
                        },
                      },
                    ]}
                    labels={() => null}
                  />
                
              </VictoryStack>

I tried adding the property range to VictoryBar, but the same Erroe appeared again. Can someone PLEASE give me an idea of the problem here? I have no idea why I'm getting the error!

1

There are 1 answers

1
Eduardo On

I've solved this by adding a right: 1 padding prop.