coinjar / react-native-wagmi-charts

A sweet & simple chart library for React Native that will make us feel like We're All Gonna Make It.
MIT License
588 stars 116 forks source link

Positive and Negative color for Line Chart #159

Open abdoerrahiem opened 1 year ago

abdoerrahiem commented 1 year ago

I want to make 2 different colors for the chart, but I cannot figure it out how to do so in Line Chart. The idea is just like the Candle Stick Chart that can receive positive and negative color. But in this chart I want the positive color shows if the value is above or same as current price (horizontal line), and the opposite for the negative color.

Currently, I just can put one color for the chart like below.

Screen Shot 2023-09-12 at 13 29 00

dima-devs commented 9 months ago

Hi @abdoerrahiem did you figure out this feature?

abhi11verma commented 9 months ago

Do you want 2 color (positive and negative) on the same chart ? Or want to change the complete line color to positive/negative based on some reference value ?

Lucas0liveir commented 9 months ago

I tried this with an index map whose value was less than my reference (horizontal line) using Highlight But the result was not ideal because the meeting point between a negative and a positive value did not change the color.

What we want is something similar to what Yahoo Finance does, for example: IMG_20240222_130127

cihangir-mercan commented 7 months ago

Hi @abdoerrahiem did you figure out this feature?

hi did you figure out?

AshotN commented 7 months ago

It's been a long time since I've used this package. But here is how I had done it.

https://github.com/coinjar/react-native-wagmi-charts/commit/ee1e69f54ce8d44a47d8f878031d798abaca11a2

cihangir-mercan commented 7 months ago

It's been a long time since I've used this package. But here is how I had done it.

ee1e69f

Thanks :) I am trying this