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

how can I set values on Y axis

Open rakshitdalal opened this issue 6 years ago • 16 comments

I want a graph like this but I am not able to set values on Y axis How can I set specific values on Y axis? Girls-2-to-20-years-growth-chart-page-001

rakshitdalal avatar Jun 17 '19 06:06 rakshitdalal

I'd like to know to

hnrqsss avatar Jul 01 '19 11:07 hnrqsss

It would be nice we we have the option to manually set the Y axis values. Anyone happen to know if we can do it ? Or it not currently supported ?

dmalaescu avatar Jul 08 '19 13:07 dmalaescu

Currently it's not supported, but I would welcome a PR.

Hermanya avatar Jul 08 '19 13:07 Hermanya

Hey @Hermanya . I can pick up this feature today and submit a PR. I noticed #253 has the ability to have evenly distributed segments, but I'd like to explicitly be able to set the y-axis lines.

My particular use case is to have the lines fall on even numbers (i.e. 100, 150, 200, etc), but I think just providing an explicit array of numbers (like the x-axis' data.labels) should work, assuming the values are all within the viewable range of the graph.

vhesener avatar Jan 15 '20 17:01 vhesener

Sure, that'd be awesome!

Hermanya avatar Jan 15 '20 17:01 Hermanya

Any solution?

luiza-avelino avatar Feb 06 '20 20:02 luiza-avelino

Hi @luiza-avelino, I actually had to go a different direction in order to meet my requirements. I began to implement these changes, but it turned into almost a whole rewrite of the Line Graph. So I reevaluated and ended up writing a custom Line Graph on top of d3.

@Hermanya I didn't want to offend or compete with RN Chart Kit, but I do have this code almost polished enough to open source. We can collaborate or I can simply release it as a healthy competition option (it's strictly a Line Graph, not a whole chart suite). But it would essentially be a complete replacement of what you have. Trying to shoehorn d3 into the existing code was too big of a change to introduce incrementally. Let me know your thoughts.

vhesener avatar Feb 07 '20 14:02 vhesener

Sounds awesome, share the link please, it might be helpful for other people in this thread.

Hermanya avatar Feb 07 '20 14:02 Hermanya

Is there any update on this?

lightning331 avatar Feb 27 '20 14:02 lightning331

@lightning331 not that I know of

Hermanya avatar Mar 01 '20 17:03 Hermanya

2022 and would be still a good feature

moisfelix avatar Jun 27 '22 09:06 moisfelix

Hi @luiza-avelino, I actually had to go a different direction in order to meet my requirements. I began to implement these changes, but it turned into almost a whole rewrite of the Line Graph. So I reevaluated and ended up writing a custom Line Graph on top of d3.

@Hermanya I didn't want to offend or compete with RN Chart Kit, but I do have this code almost polished enough to open source. We can collaborate or I can simply release it as a healthy competition option (it's strictly a Line Graph, not a whole chart suite). But it would essentially be a complete replacement of what you have. Trying to shoehorn d3 into the existing code was too big of a change to introduce incrementally. Let me know your thoughts.

Is there any chance you could make this publicly available?

ishaanbuildsthings avatar Jul 12 '23 19:07 ishaanbuildsthings

2023 and would be awesome to have this

herbertvuijk avatar Aug 11 '23 13:08 herbertvuijk

August 2023 and would still be a great feature

mrjam2 avatar Aug 18 '23 11:08 mrjam2

January 2024 and would still be a great feature

aansari-noon avatar Jan 09 '24 20:01 aansari-noon