react-native-chart icon indicating copy to clipboard operation
react-native-chart copied to clipboard

yAxis label value does not match the each bar value

Open NickBai opened this issue 9 years ago • 4 comments

eg : const barData = [ [0, 1], [1, 3], [3, 7], [4, 9], ]; but the '4' bar match the yAxis value is 7 in chart...

NickBai avatar Jun 22 '16 01:06 NickBai

Can you post a screenshot? Just for clarity as I'm combing through these. Thank you!

tomauty avatar Jun 29 '16 14:06 tomauty

Hi. I believe i can provide more info. I have the same thing:

image

with same data as example: chartData: [ [0, 1], [1, 3], [3, 7], [4, 9], ], (Completely unrelated to rest of page)

and chart: <Chart style={styles.chart} data={this.state.chartData} verticalGridStep={5} type="line" showDataPoint={true} tightBounds={true} />

style:

chart: { width: 300, height: 150, },

And i think it is related with vertical grid step. Because when i set its value to be equal to the number of points, this happens:

image

Izitable avatar Jul 21 '16 14:07 Izitable

This should be fixed with the react-native-svg change. You can try out that branch for a preview in the meantime.

tomauty avatar Aug 26 '16 13:08 tomauty

As a generic FYI — I am no longer able to maintain this library. I recommend checking out victory-native as it's much more maintained.

tomauty avatar Jul 07 '17 20:07 tomauty