2 years ago

#11543

test-img

dmulay360

How to align the grid view with tick labels in victory native

I want the grid to align with the x-axis on the graph below. I have the bar alignment set to "end", but the grid view does not align and as a result, there is a bar that is "outside" the graph. How can I fix this?

enter image description here

<VictoryChart theme={VictoryTheme.material}>
          <VictoryAxis
            tickLabelComponent={<VictoryLabel textAnchor={"start"} />}
          />
          <VictoryAxis
            style={{ grid: { paddingLeft: 0 } }}
            dependentAxis
            orientation="right"
          />
          <VictoryBar
            style={{ data: { fill: "#c43a31" } }}
            alignment="end"
            data={sampleData}
          />
        </VictoryChart>

javascript

victory-charts

victory-native

0 Answers

Your Answer

Accepted video resources