amcharts / amcharts5

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

GaplessDateAxis weird behavior zoom out #1683

Closed paulodfavero closed 2 months ago

paulodfavero commented 2 months ago

When I load more data, the gap between datas works fine, but create a weird giant column in the chart.

https://github.com/user-attachments/assets/500ff802-a3ec-4c93-b543-e694091e0000

If I change to line version it works fine.

https://github.com/user-attachments/assets/142ef8b3-851a-45b6-9ec3-5ff5b19b89ab

    am5xy.GaplessDateAxis.new(root, {
      ..._dateAxisSettings[chartType],
      maxDeviation: 1,
      extraMax: 0.07,
      baseInterval: _dateAxisSettings[chartType].baseInterval!,
      renderer: am5xy.AxisRendererX.new(root, {}),
    })
  );
workingbuddy10 commented 2 months ago

Can you provide codepen, to reproduce/test it. @paulodfavero

paulodfavero commented 2 months ago

Can you provide codepen, to reproduce/test it. @paulodfavero

Unfortunately I can't right now. Is it possible to figure out why this happening only with video? Do you need more data to understand? I can provide you more codebase, if you want.

martynasma commented 2 months ago

It looks like an issue with data, but it's impossible to determine without actually seeing it.

Make sure your data is sorted in ascending order.

paulodfavero commented 2 months ago

It looks like an issue with data, but it's impossible to determine without actually seeing it.

Make sure your data is sorted in ascending order.

Thanks for the answer. It is ordered by asc and with no repeated data. If I change GaplessDataAxis to DataAxis this giant candle doesn't display. A gap in the chart display, but a weird candle doesn't. image

paulodfavero commented 2 months ago

Hi guys! I found the problem. locationX: 0 set on CandlestickSeries.

If I remove the locationX: 0 the giant candle disappears. I think this is a bug.

without locationX: 0

image

with locationX:0

image

martynasma commented 2 months ago

We'll need a way to reproduce it in order to verify if it's a bug.

Can you post your chart code and data on CodePen?

paulodfavero commented 2 months ago

We'll need a way to reproduce it in order to verify if it's a bug.

Can you post your chart code and data on CodePen?

https://codesandbox.io/p/sandbox/amchart-7txxxm?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522cm0beh90700063b6enp0pkvvn%2522%252C%2522sizes%2522%253A%255B100%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522cm0beh90700023b6e3w28bgh7%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522cm0beh90700033b6erc7rrw73%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522cm0beh90700053b6egh5uzr7v%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522cm0beh90700023b6e3w28bgh7%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0beh90600013b6e9hycwm0o%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fsrc%252Findex.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522cm0bgs6j100023b6d3jr63hjq%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A13%252C%2522startColumn%2522%253A28%252C%2522endLineNumber%2522%253A13%252C%2522endColumn%2522%253A28%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.html%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522cm0bgxz7c00023b6d8y889fow%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A304%252C%2522startColumn%2522%253A6%252C%2522endLineNumber%2522%253A304%252C%2522endColumn%2522%253A6%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522cm0bhimwi00023b6d4r4yesp9%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A12%252C%2522startColumn%2522%253A20%252C%2522endLineNumber%2522%253A12%252C%2522endColumn%2522%253A20%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.js%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522cm0bi2voe00023b6duc563j8l%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A234%252C%2522startColumn%2522%253A40%252C%2522endLineNumber%2522%253A234%252C%2522endColumn%2522%253A40%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252Fam5.js%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522cm0beh90700023b6e3w28bgh7%2522%252C%2522activeTabId%2522%253A%2522cm0bi2voe00023b6duc563j8l%2522%257D%252C%2522cm0beh90700053b6egh5uzr7v%2522%253A%257B%2522id%2522%253A%2522cm0beh90700053b6egh5uzr7v%2522%252C%2522activeTabId%2522%253A%2522cm0bgslvo001m3b6dpyl6lqrp%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522cm0beh90700043b6ex9btk6mm%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%252C%257B%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522id%2522%253A%2522cm0bgslvo001m3b6dpyl6lqrp%2522%252C%2522mode%2522%253A%2522permanent%2522%257D%255D%257D%252C%2522cm0beh90700033b6erc7rrw73%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522cm0beh90700033b6erc7rrw73%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

martynasma commented 2 months ago

Thanks. We were able to reproduce it and are looking into it.

Reduced case for testing: https://codepen.io/team/amcharts/pen/BagVMza/e9b09a75b3436f3db946de808db3efd5?editors=0010

paulodfavero commented 2 months ago

Thanks. We were able to reproduce it and are looking into it.

Reduced case for testing: https://codepen.io/team/amcharts/pen/BagVMza/e9b09a75b3436f3db946de808db3efd5?editors=0010

I appreciate your attention.

martynasma commented 2 months ago

Fixed in 5.10.4.

[5.10.4] - 2024-08-30

Changed

Fixed

Full change log.

Download options.

Make sure you clear your browser cache after upgrading. And feel free to contact us again if you are still experiencing this issue.