Open purplegamba opened 5 years ago
@purplegamba Thanks for reporting the issue. Can you provide with reproducible code, so we can take a look at this. Thanks
@purplegamba Thanks for reporting the issue. Can you provide with reproducible code, so we can take a look at this. Thanks
I've added code and a screenshot above. This is my first time reporting an issue and providing code, so if I haven't done it correctly please let me know.
@purplegamba no worries, you did it correct, this code is good enough for reproducing :). I'll look into this soon.
What is the problem?
Layered BarChart and LineChart do not line up horizontally because the x coordinates are different to account for the width of the bars. This is probably not exactly a bug, but it does present a serious problem for me. I am attempting to create a complex chart with multiple layered charts. My data is an array, where each entry has a date, and a variety of other values. The dates are used for the x-axis, and the other values are displayed on various LineCharts, BarCharts, or used in creating decorators or other visuals on the charts. I need them to line up perfectly so that data for a given date is visually correlated.
ETA: I have added code and a screenshot. I didn't use dates in this example, just x and y values where x is used for the LineChart and y for the BarChart. Ideally, the points and gridlines of the LineChart would be centered inside the corresponding bar of the BarChart.
When does it happen?
Anytime a BarChart and LineChart using the same x data are layered.
What platform?
React Native version: 0.59 react-native-svg-charts-version: 5.3.0
Code to reproduce