You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use Victory Charts to create a chart with a colored background.
Because I didn't find out how to do conditional background color, I figured I might want to use a background image.
However, my background image doesn't really stay in the background but instead is in the foreground and covers the whole chart.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi all
I wanted to use Victory Charts to create a chart with a colored background.
Because I didn't find out how to do conditional background color, I figured I might want to use a background image.
However, my background image doesn't really stay in the background but instead is in the foreground and covers the whole chart.
My code:
function CustomBackground() {
return (
<Image
style={styles.tinyLogo}
source={{
uri:
// 'https://i.ibb.co/tP2cGGh/Screenshot-14.png',
'https://www.phinational.org/wp-content/uploads/2017/07/fb-test-image-470x246-300x157.jpg'
}}
/>
);
}
const MyChart = props => {
return (
<VictoryChart
domain={{ y: [2000, 5000] }}
style={{
background: {opacity: 1}
}}
backgroundComponent={
}
);
};
Beta Was this translation helpful? Give feedback.
All reactions