Merge pull request #142 from Abhinandan-Kushwaha/feat/negative-line-chart

Feat/negative line chart
This commit is contained in:
Abhinandan Kushwaha 2022-04-17 13:22:26 +05:30 committed by GitHub
commit 027aecce2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "react-native-gifted-charts",
"version": "1.0.19",
"version": "1.0.20",
"description": "The most complete library for Bar, Line, Area, Pie, Donut and Stacked Bar charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
"main": "src/index.tsx",
"files": [

View File

@ -743,6 +743,9 @@ export const BarChart = (props: PropTypes) => {
<Text
style={[
{position: 'absolute'},
yAxisSide === 'right' && {
transform: [{rotateY: '180deg'}],
},
referenceLine1Config.labelTextStyle,
]}>
{referenceLine1Config.labelText}
@ -762,6 +765,9 @@ export const BarChart = (props: PropTypes) => {
<Text
style={[
{position: 'absolute'},
yAxisSide === 'right' && {
transform: [{rotateY: '180deg'}],
},
referenceLine2Config.labelTextStyle,
]}>
{referenceLine2Config.labelText}
@ -781,6 +787,9 @@ export const BarChart = (props: PropTypes) => {
<Text
style={[
{position: 'absolute'},
yAxisSide === 'right' && {
transform: [{rotateY: '180deg'}],
},
referenceLine3Config.labelTextStyle,
]}>
{referenceLine3Config.labelText}
@ -1214,7 +1223,10 @@ export const BarChart = (props: PropTypes) => {
{
// backgroundColor: 'yellow',
height:
containerHeight + 130 + horizSectionsBelow.length * stepHeight + labelsExtraHeight,
containerHeight +
130 +
horizSectionsBelow.length * stepHeight +
labelsExtraHeight,
paddingLeft: initialSpacing,
paddingBottom:
horizSectionsBelow.length * stepHeight + labelsExtraHeight,

View File

@ -1681,6 +1681,9 @@ export const LineChart = (props: propTypes) => {
<Text
style={[
{position: 'absolute'},
yAxisSide === 'right' && {
transform: [{rotateY: '180deg'}],
},
referenceLine1Config.labelTextStyle,
]}>
{referenceLine1Config.labelText}
@ -1700,6 +1703,9 @@ export const LineChart = (props: propTypes) => {
<Text
style={[
{position: 'absolute'},
yAxisSide === 'right' && {
transform: [{rotateY: '180deg'}],
},
referenceLine2Config.labelTextStyle,
]}>
{referenceLine2Config.labelText}
@ -1719,6 +1725,9 @@ export const LineChart = (props: propTypes) => {
<Text
style={[
{position: 'absolute'},
yAxisSide === 'right' && {
transform: [{rotateY: '180deg'}],
},
referenceLine3Config.labelTextStyle,
]}>
{referenceLine3Config.labelText}