fix: only render y axis labels if they are not empty

This commit is contained in:
Brian Sztamfater 2023-08-24 10:39:39 -03:00
parent 0b223a4b5b
commit 6c0bd2e75a
1 changed files with 4 additions and 4 deletions

View File

@ -178,7 +178,7 @@ export const renderHorizSections = props => {
if (hideOrigin && index === horizSections.length - 1) {
label = '';
}
return (
return label.length > 0 ? (
<View
key={index}
style={[
@ -220,7 +220,7 @@ export const renderHorizSections = props => {
{label}
</Text>
</View>
);
) : null;
})
/***********************************************************************************************/
/***********************************************************************************************/
@ -289,7 +289,7 @@ export const renderHorizSections = props => {
horizSectionsBelow[horizSectionsBelow.length - 1 - index].value,
index,
);
return (
return label.length > 0 ? (
<View
key={index}
style={[
@ -331,7 +331,7 @@ export const renderHorizSections = props => {
{label}
</Text>
</View>
);
) : null;
})
/***********************************************************************************************/
/***********************************************************************************************/