fixed issue with reference line label when y axis is on right side

This commit is contained in:
Abhinandan-Kushwaha 2022-04-17 13:20:55 +05:30
parent 2d23a02fc0
commit 7878058ec7
2 changed files with 22 additions and 1 deletions

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}