Replies: 6 comments
-
hey @nouman91 thanks for checking out so to get what you want, you should do something like the following (currently your <XYChart {...}>
<AreaSeries />
<LineSeries />
<GlyphSeries />
</XYChart> |
Beta Was this translation helpful? Give feedback.
-
@williaster Thank you for replying so quickly. Yeah, I had tried switching its place but it did not working. This is the result if I use the above arrangement. I also tried other position but its always stays there |
Beta Was this translation helpful? Give feedback.
-
This is how it looks if I remove the line series. I think there is something essential I am missing & can't quite figure it out the what. |
Beta Was this translation helpful? Give feedback.
-
to me it looks like your x-accessor is returning different data since the series are not aligned (hard to tell without a code snippet, but the x-accessor is different in your original code snippet). also to make the bottom of the area not map to zero you need to specify bot |
Beta Was this translation helpful? Give feedback.
-
I managed to put together a dirty code sandbox please check when you get a chance |
Beta Was this translation helpful? Give feedback.
-
Moving this issue to a discussion |
Beta Was this translation helpful? Give feedback.
-
Hi Visx folks,
I am working with XY scatter chart and my use case is to have area series & line series in the same chart. I want to have area series as a background to Line Series. I have attached two images one is final result and one is my current progress. I am not able to figure out how to get area behind the lines. For reference area is the blue color wavy part on the chart.
Final Chart:
Current chart:
Sample code that I am working with
` <XYChart
xScale={{ type: 'band', nice: true }}
yScale={{ type: 'linear', nice: true }}
width={props.width}
height={500}
>
Any idea or suggestion on how can I achieve the above result?
Thanks for your awesome work!
Beta Was this translation helpful? Give feedback.
All reactions