Abhinandan-Kushwaha / react-native-gifted-charts

The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.
https://www.npmjs.com/package/react-native-gifted-charts
MIT License
736 stars 149 forks source link

How to create group bar chart (Left Y-Axis) and 2 line chart (Right Y-axis) with negative values #814

Closed sandeep-synclovis closed 3 weeks ago

sandeep-synclovis commented 3 weeks ago
65QV3hSB

I want to create a graph as same to the above image where we have a group bar connected with the left Y-axis and 2 two-line graphs connected with the right Y-axis, I can achieve this if all the values are positive, but face a challenge where values are negative.

When trying I am getting it like the below image.

VCZUljrt
  1. Lines are not aligned with the right Y-axis
  2. The right Y-Axis is not showing values correctly(it supposed to show 50, 25, 0, -25).
Abhinandan-Kushwaha commented 3 weeks ago

Hi @sandeep-synclovis Can you share the code and data?

sandeep-synclovis commented 3 weeks ago

Hi @Abhinandan-Kushwaha ,

I am sharing a pdf doc with data and code.

Data And Barchart Code.pdf

Also, sometimes left Y-Axis may have a minimum value negative but the right Y-Axis might have a minimum value of 0 and vice versa but both minimum values should be aligned in the same line.

Abhinandan-Kushwaha commented 3 weeks ago

Hi @sandeep-synclovis I have fixed the positioning of the Lines and the secondary Y-axis labels. The fixes are available from version 1.4.32 onwards.

Also, in your code you are passing a negative value to the negativeStepValue prop. You are not supposed to pass a negative value here, but a positive value (just remove * -1 from your code). Same for the secondary Y-axis.

Please use the latest version of the library.

sandeep-synclovis commented 3 weeks ago

Hi, Thanks for the changes and quick update, but still my issue related to the right Y-Axis is not resolved.

If you observe shared screenshots, the first value on the right Y-axis should be 3000 but it's showing -1500. here for right YAxis, I am passing [3000, 1500, 0, -1500]

Also if you check in the right Y-Axis last value is not aligned and it should be above the dashed line.

Screenshot 2024-09-05 at 12 44 12 PM
Abhinandan-Kushwaha commented 3 weeks ago

Hi @sandeep-synclovis Thanks for reporting this issue. It has been fixed from versions 1.4.33 onwards. 🎉

Please use the latest version of the library.

sandeep-synclovis commented 2 weeks ago

Hi @Abhinandan-Kushwaha,

Thanks for the updates, but still right Y-Axis is not showing correctly. It's fine if both left & right y-Axis have one negative value. But if we have only one axis with a negative value it's not showing correctly

  1. Screenshot 2024-09-09 at 1 29 18 PM

Here, the left axis has a negative value but the right axis is all positive. In this, it's showing 2000 two times & 0 is not coming we make hideOrigin false.

  1. Screenshot 2024-09-09 at 1 32 17 PM

Here, both the left & right axes are correct. because both have one negative value.

  1. Screenshot 2024-09-09 at 1 35 37 PM

Here, the left axis has all positive values but the right axis has one negative value, here both the left & right axis are showing incorrectly.

Please review this, I was trying to find the origin in gifted-charts-core but wasn't able to fix it, please help.

Thanks

Abhinandan-Kushwaha commented 2 weeks ago

Hi @sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

sandeep-synclovis commented 2 weeks ago

Hi, @Abhinandan-Kushwaha Thanks for the update but the above issue is still not fixed.

sandeep-synclovis commented 2 weeks ago

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

Abhinandan-Kushwaha commented 2 weeks ago

We can connect over Google Meet. Please ping when you are available. https://meet.google.com/scm-jogb-tsr

On Thu, Sep 12, 2024 at 11:56 AM Sandeep Mishra @.***> wrote:

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub < https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345374064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5ERUCSJ4FL5WN4EC2ELMDZWEXZRAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGM3TIMBWGQ . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345374064@ github.com>

sandeep-synclovis commented 2 weeks ago

We can meet now. With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 12:51 PM Abhinandan Kushwaha < @.***> wrote:

We can connect over Google Meet. Please ping when you are available. https://meet.google.com/scm-jogb-tsr

On Thu, Sep 12, 2024 at 11:56 AM Sandeep Mishra @.***> wrote:

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

— Reply to this email directly, view it on GitHub < https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345374064>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AE5ERUCSJ4FL5WN4EC2ELMDZWEXZRAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGM3TIMBWGQ>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345374064@ github.com>

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345460992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPUTAJJGIGYOVUNC5QPVA3ZWE6GZAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGQ3DAOJZGI . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345460992@ github.com>

sandeep-synclovis commented 2 weeks ago

Hi, Please let me know if we can connect at 3:00 PM.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 1:07 PM Sandeep Mishra @.***> wrote:

We can meet now. With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 12:51 PM Abhinandan Kushwaha < @.***> wrote:

We can connect over Google Meet. Please ping when you are available. https://meet.google.com/scm-jogb-tsr

On Thu, Sep 12, 2024 at 11:56 AM Sandeep Mishra @.***> wrote:

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

— Reply to this email directly, view it on GitHub < https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345374064>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AE5ERUCSJ4FL5WN4EC2ELMDZWEXZRAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGM3TIMBWGQ>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345374064@ github.com>

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345460992, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPUTAJJGIGYOVUNC5QPVA3ZWE6GZAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGQ3DAOJZGI . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345460992@ github.com>

Abhinandan-Kushwaha commented 2 weeks ago

Please join

On Thu, Sep 12, 2024 at 12:50 PM Abhinandan Kushwaha @.***> wrote:

We can connect over Google Meet. Please ping when you are available. https://meet.google.com/scm-jogb-tsr

On Thu, Sep 12, 2024 at 11:56 AM Sandeep Mishra @.***> wrote:

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub < https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345374064, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5ERUCSJ4FL5WN4EC2ELMDZWEXZRAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGM3TIMBWGQ . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345374064@ github.com>

Abhinandan-Kushwaha commented 2 weeks ago

I am online. Can you join now?

On Thu, Sep 12, 2024 at 1:15 PM Sandeep Mishra @.***> wrote:

Hi, Please let me know if we can connect at 3:00 PM.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 1:07 PM Sandeep Mishra @.***> wrote:

We can meet now. With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 12:51 PM Abhinandan Kushwaha < @.***> wrote:

We can connect over Google Meet. Please ping when you are available. https://meet.google.com/scm-jogb-tsr

On Thu, Sep 12, 2024 at 11:56 AM Sandeep Mishra @.***> wrote:

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE>

. You are receiving this because you were mentioned.Message ID:

<Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345374064>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AE5ERUCSJ4FL5WN4EC2ELMDZWEXZRAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGM3TIMBWGQ>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345374064@ github.com>

— Reply to this email directly, view it on GitHub < https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345460992>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AOPUTAJJGIGYOVUNC5QPVA3ZWE6GZAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGQ3DAOJZGI>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345460992@ github.com>

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345507842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5ERUGQOQC62HMNVO5FD23ZWFBDNAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGUYDOOBUGI . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345507842@ github.com>

sandeep-synclovis commented 2 weeks ago

Yes, I am ready. With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 1:17 PM Abhinandan Kushwaha < @.***> wrote:

I am online. Can you join now?

On Thu, Sep 12, 2024 at 1:15 PM Sandeep Mishra @.***> wrote:

Hi, Please let me know if we can connect at 3:00 PM.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 1:07 PM Sandeep Mishra @.***> wrote:

We can meet now. With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 12:51 PM Abhinandan Kushwaha < @.***> wrote:

We can connect over Google Meet. Please ping when you are available. https://meet.google.com/scm-jogb-tsr

On Thu, Sep 12, 2024 at 11:56 AM Sandeep Mishra @.***> wrote:

Hi, @Abhinandan-Kushwaha/react-native-gifted-charts @.***>, Thanks for the update but the above issue is still not resolved.

Please let me know if we can connect via Zoom, Google Meet or any other way, to go through this issue and resolve this issue.

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Thu, Sep 12, 2024 at 5:12 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis Thanks for reporting this bug. It has been fixed from versions 1.4.34 onwards. Please use the latest version of the library.

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2344979221>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AOPUTAIOWX62VM5VIIRYKYLZWDIPJAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBUHE3TSMRSGE>

. You are receiving this because you were mentioned.Message ID:

<Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2344979221@ github.com>

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345374064>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AE5ERUCSJ4FL5WN4EC2ELMDZWEXZRAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGM3TIMBWGQ>

. You are receiving this because you were mentioned.Message ID:

<Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345374064@ github.com>

— Reply to this email directly, view it on GitHub <

https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345460992>,

or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AOPUTAJJGIGYOVUNC5QPVA3ZWE6GZAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGQ3DAOJZGI>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345460992@ github.com>

— Reply to this email directly, view it on GitHub < https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345507842>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AE5ERUGQOQC62HMNVO5FD23ZWFBDNAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGUYDOOBUGI>

. You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345507842@ github.com>

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2345511116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPUTAKUXLGWLCXF4DR3UOLZWFBJ5AVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVGUYTCMJRGY . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2345511116@ github.com>

Abhinandan-Kushwaha commented 2 weeks ago

Hi @sandeep-synclovis I have made fixes related to the secondary Y-axis and negative labels for the secondary Y-axis. Can you try again with the latest version of the library?

As per our discussion, you need the secondary Y-axis to have the 0 value below the Y-axis. For this, you can use the property yAxisOffset inside the secondaryYAxis object.

The yAxisOffset inside secondaryYAxis should be the value on the secondary Y-axis that coincides with the Y-axis.

Here's an example-

onst data = [
  {value: 10},
  {value: 7},
  {value: -9},
  {value: 9},
  {value: 14},
  {value: -7},
  {value: 12},
];

const lData = [
  {value: 0},
  {value: 0.2},
  {value: 0.4},
  {value: -0.06},
  {value: 0.5},
  {value: -0.14},
  {value: 0.65},
];

return (
  <BarChart
    data={data}
    barWidth={15}
    spacing={15}
    frontColor={'rgba(50,100,50,0.5)'}
    showLine
    lineData={lData}
    lineConfig={{isSecondary: true, spacing: 15}}
    secondaryYAxis={{
      yAxisOffset: 0.14,
      noOfSectionsBelowXAxis: 5,
    }}
  />
);

The output of the above code is-

offset

Please use the latest version of the library.

sandeep-synclovis commented 2 weeks ago

Hi,

I checked the solution you shared with me, but unfortunately, your solution didn't work. It somehow managed to set the Y-axis (not exactly how I wanted) but the line or bar chart was not aligned with the Y-axis. It will be good if we get the left & right axis alignment separately (If possible please look into this).

Thanks

With Best Regards, Sandeep Mishra Lead Software Engineer Synclovis Systems Pvt. Ltd. https://www.synclovis.com/ | Bluewings http://www.bluewings.in/ Phone: +91 9620971846, +91 7892633810 Locations: Bangalore | New Jersey

On Fri, Sep 13, 2024 at 2:52 AM Abhinandan Kushwaha < @.***> wrote:

Hi @sandeep-synclovis https://github.com/sandeep-synclovis I have made fixes related to the secondary Y-axis and negative labels for the secondary Y-axis. Can you try again with the latest version of the library?

As per our discussion, you need the secondary Y-axis to have the 0 value below the Y-axis. For this, you can use the property yAxisOffset inside the secondaryYAxis object.

The yAxisOffset inside secondaryYAxis should be the value on the secondary Y-axis that coincides with the Y-axis.

Here's an example-

onst data = [ {value: 10}, {value: 7}, {value: -9}, {value: 9}, {value: 14}, {value: -7}, {value: 12},]; const lData = [ {value: 0}, {value: 0.2}, {value: 0.4}, {value: -0.06}, {value: 0.5}, {value: -0.14}, {value: 0.65},]; return ( <BarChart data={data} barWidth={15} spacing={15} frontColor={'rgba(50,100,50,0.5)'} showLine lineData={lData} lineConfig={{isSecondary: true, spacing: 15}} secondaryYAxis={{ yAxisOffset: 0.14, noOfSectionsBelowXAxis: 5, }} />);

The output of the above code is- Screenshot.2024-09-13.at.2.51.49.AM.png (view on web) https://github.com/user-attachments/assets/8e3c01c7-7493-4eec-9212-95e3f54e8675

Please use the latest version of the library.

— Reply to this email directly, view it on GitHub https://github.com/Abhinandan-Kushwaha/react-native-gifted-charts/issues/814#issuecomment-2347268947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOPUTAJQSWYSEWXGXFOJCJTZWIAZZAVCNFSM6AAAAABNRKB2USVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBXGI3DQOJUG4 . You are receiving this because you were mentioned.Message ID: <Abhinandan-Kushwaha/react-native-gifted-charts/issues/814/2347268947@ github.com>

sandeep-synclovis commented 1 week ago

Hi,

For now, I am setting both the right & left y-axis as negative if any of the axes is negative. But it will be very helpful if we get this feature in future where we can set one y-axis minimum value as negative & one-axis minimum value as 0 or positive.