amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
Other
345 stars 92 forks source link

adding connect : false results in the grouped series disappearing upon zooming. #1656

Closed d2Evil closed 1 month ago

d2Evil commented 1 month ago

Bug description

I'm trying to add two grouped series to the same chart. However, setting connect: false for one series causes that series to disappear when zooming in. The tooltips remain visible, but the line series vanishes.

amcharts series

CodePen : https://codepen.io/catto22/pen/WNqjWRm

martynasma commented 1 month ago

This is a correct behavior.

You have set your data granularity to 1 hour, whereas data comes at 4-hour intervals for the second series.

This means that when you zoom in significantly enough so that grouping is turned off, you now have data items at 4 hour intervals, whereas your "break" period is 1 hour, hence all data items have a break between them.

You can fix that by setting autoGapCount: 4 for the second series: https://www.amcharts.com/docs/v5/charts/xy-chart/series/line-series/#Auto_gaps_with_dates

d2Evil commented 1 month ago

Setting autoGapCount seems to fix the isssue. Thanks for the info.