Fixed issue with hideOrigin in Line charts

This commit is contained in:
Abhinandan Kushwaha 2022-01-12 19:20:31 +05:30
parent c31416bd3f
commit dfc37ff1a7
2 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{
"name": "react-native-gifted-charts",
"version": "0.2.6",
"version": "0.2.7",
"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": [

View File

@ -1061,16 +1061,22 @@ export const LineChart = (props: propTypes) => {
marginBottom: stepHeight / -2,
},
]}>
{showFractionalValues
{hideOrigin
? index === horizSections.length - 1
? ''
: showFractionalValues
? sectionItems.value
? sectionItems.value
: '0'
: sectionItems.value
? sectionItems.value.toString().split('.')[0]
: '0'
: showFractionalValues
? sectionItems.value
? sectionItems.value
: hideOrigin
? ''
: '0'
: sectionItems.value
? sectionItems.value.toString().split('.')[0]
: hideOrigin
? ''
: '0'}
</Text>
) : null}