From 93d4093fca5f717459a4b2983811a42c3085c560 Mon Sep 17 00:00:00 2001 From: Abhinandan Kushwaha Date: Mon, 11 Oct 2021 05:08:40 +0530 Subject: [PATCH] Made Y axis Label texts a separate Array --- package.json | 2 +- src/BarChart/index.tsx | 2 +- src/LineChart/index.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index dae8fd3..4d802b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-gifted-charts", - "version": "0.1.8", + "version": "0.1.9", "description": "The most complete library for Bar, Line, Area, Pie and Donut charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.", "main": "src/index.tsx", "files": [ diff --git a/src/BarChart/index.tsx b/src/BarChart/index.tsx index 28db91f..d8fe841 100644 --- a/src/BarChart/index.tsx +++ b/src/BarChart/index.tsx @@ -217,7 +217,7 @@ export const BarChart = (props: PropTypes) => { } horizSections.push({ value: props.yAxisLabelTexts - ? props.yAxisLabelTexts[i] ?? value.toString() + ? props.yAxisLabelTexts[noOfSections - i] ?? value.toString() : value.toString(), }); } diff --git a/src/LineChart/index.tsx b/src/LineChart/index.tsx index 6766d7e..18170ee 100644 --- a/src/LineChart/index.tsx +++ b/src/LineChart/index.tsx @@ -290,7 +290,7 @@ export const LineChart = (props: propTypes) => { } horizSections.push({ value: props.yAxisLabelTexts - ? props.yAxisLabelTexts[i] ?? value.toString() + ? props.yAxisLabelTexts[noOfSections - i] ?? value.toString() : value.toString(), }); }