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
Hi, I've come across an issue while using the XYChart with an xScale of type time in combination with the BarSeries.
There are some scenarios causing problems:
When using the BarSeries without the BarGroup, their size and offset appear to be incorrect. This results in the following output (for reference, the LineSeries above is shown):
Using the BarStack component, the bars are stacked correctly, but their size and offsets are incorrect.
I tried using the band scale, which displays the charts correctly. However, in my case, I cannot use it as I need to synchronize all the timeseries charts of a dashboard.
In the first scenario, the problem arises when I set an xScale of type "time" with a custom domain that exceeds the effective domain of the data passed as a prop.
In the second scenario, upon examining the code, it seems not to support scales other than the band scale.
if we were able to detect the granularity of time that was being plotted (which could vary widely from chart to chart), we could then generate a band scale behind the scenes using time scale intervals. there's some discussion of that in this stack overflow question.
open to other suggestions for how to do this in a generic way. once we align on a solution I'm happy to PR, or happy to review a PR if there's community interest 🙏
Hi, I've come across an issue while using the XYChart with an xScale of type time in combination with the BarSeries.
There are some scenarios causing problems:
When using the BarSeries without the BarGroup, their size and offset appear to be incorrect. This results in the following output (for reference, the LineSeries above is shown):
If the BarSeries is wrapped by BarGroup, the BarSeries renders with the correct offsets, but their width becomes equal to 0 (similar to issue <BarSeries> bars have 0 width when using time scale #1457 ):
Using the BarStack component, the bars are stacked correctly, but their size and offsets are incorrect.
I tried using the band scale, which displays the charts correctly. However, in my case, I cannot use it as I need to synchronize all the timeseries charts of a dashboard.
In the first scenario, the problem arises when I set an xScale of type "time" with a custom domain that exceeds the effective domain of the data passed as a prop.
In the second scenario, upon examining the code, it seems not to support scales other than the band scale.
I replicated the issue here https://codesandbox.io/s/loving-mayer-j2xwdm?file=/ExampleControls.tsx
The text was updated successfully, but these errors were encountered: