amcharts / amcharts5

The newest, fastest, and most advanced amCharts charting library for JavaScript and TypeScript apps.
321 stars 90 forks source link

Overlapping charts in the same Root #1595

Open bossbelle opened 1 week ago

bossbelle commented 1 week ago

I created 2 charts in the same root. The problem was that what I wanted was two charts stacked vertically and displayed, but the two charts are overlapping. Is there a way to stack two charts vertically and display them?

I would like to link two charts like the example below. However, in the example below, each root is used for each Div. I want to export two charts as one image, so I have to put two charts in one root.

https://www.amcharts.com/docs/v5/tutorials/syncing-axis-zooms-across-multiple-charts/

codepen

martynasma commented 1 week ago

You need to add vertical layout to the main container so it knows how to arrange its children:

root.container.set("layout", root.verticalLayout);