wuxudong / react-native-charts-wrapper

a react native charts wrapper (support android & iOS)
2.45k stars 659 forks source link

In iOS APP charts are going up and down of the Frame #991

Open solutionprovider9174 opened 6 months ago

solutionprovider9174 commented 6 months ago

I am using Combined chart in the react native chart wrapper. I am attaching my candlestick.js now but all wroks fine in android but in iOS APP charts are going up and down of the Frame, while they are not going up and down at the android. i can't figure out it.

CandleStick.zip

Specifications Version:0.6.0 Platform:ios

solutionprovider9174 commented 6 months ago

@wuxudong Can you help me for this please?

solutionprovider9174 commented 6 months ago

in only iOS app, X axis and Y axis values is being changed continuously even though there is not action by user.

solutionprovider9174 commented 6 months ago

@wuxudong The reason is why I need to do up down from my finger is. 1- chart is going down or up of the frame due to wrong y axis numbers or incomplete numbers according to the current candles in frame . 2- its allowing me to move up down from finger . If the y axis shows accurate market values. According to the candles stick high and low values. Then it will always come perfect in frame. Also the y axis should contain the highest value of a candlestick + some more points. And lowest value of candle stick plus some more points. So that chart must not touch the upper and lower border. Also when we keep scrolling to left. The y axis values should anatomically be adjusted according to the new candlestick high and low values plus same some extra point. All are working perfectly in Android only. but not working correctly in iOS.

solutionprovider9174 commented 6 months ago

<CombinedChart ref={candleChart} style={styles.chart} marker={Marker} data={chartData} zoom={zoom} // dragDecelerationEnabled={false} xAxis={xAxis} yAxis={priceYAxis} group={'candle'} identifier={'main'} scaleYEnabled={false} autoScaleMinMaxEnabled={false} legend={{ enabled: false }} doubleTapToZoomEnabled={false} syncX={true} syncY={false} visibleRange={{ x: { min: 10, max: 500 }, y: { min: 100, max: 10000 } }} chartDescription={{ text: descText, textColor: 255, // textSize: PropTypes.number, // positionX: PropTypes.number, // positionY: PropTypes.number, }} onChange={event => handleChange(event)} /> Here i think i have to update this code line

visibleRange={{ x: { min: 10, max: 500 }, y: { min: 100, max: 10000 } }} we can set yaxis max and min every time on combinechart component. i think it should be dynamic parameter for min and max

solutionprovider9174 commented 6 months ago

@wuxudong hi, Any update for me now?

solutionprovider9174 commented 6 months ago

@wuxudong I am still waiting...

solutionprovider9174 commented 6 months ago

I tried to 3 more ways:

1. tried to use labelcount, labelcountforce for yaxis param

2. tried to use granularity for yaxis param

3. tried to use '$' before value.

But all things are not working for solution.

solutionprovider9174 commented 6 months ago

@wuxudong Are you not available to help for this issue fixing?

wuxudong commented 5 months ago

Can you post a complete demo code and sceenshots? I don't get it.