margelo / react-native-graph

📈 Beautiful, high-performance Graphs and Charts for React Native built with Skia
https://margelo.io
MIT License
2.04k stars 115 forks source link

Is gradientFillColors supported on Android? #73

Open jlm0 opened 1 year ago

jlm0 commented 1 year ago

As the title states, is gradientFillColors supported on Android? The prop does not appear to be affecting the chart. <LineGraph style={{height: 80, width: '100%'}} points={placeholderData} animated={false} color={theme.colors.primary} gradientFillColors={['#7476df5D', '#7476df4D', '#7476df00']} lineThickness={2} />

Harsh-Tuwar commented 6 months ago

Hi @jlm0

It does work for android emulator! I tested it. See screenshot attached below:-

Screenshot 2024-03-16 at 6 55 21 PM

Here is what my code looks like:-

<LineGraph
    style={{ width: '100%', height: 300 }}
    points={history}
    animated={true}
    color="#017560"
    gradientFillColors={['#7476df5D', '#7476df4D', '#7476df00']} 
    enablePanGesture
    onPointSelected={onPointSelected}
    verticalPadding={25}
    onGestureEnd={() => setSelectedPoint(null)}
    enableIndicator
    indicatorPulsating
    enableFadeInMask
/>

Hope this helps!

Happy coding 🧑🏼‍💻 Cheers 🥂