Jlong
Posts: 2
Joined: Thu Nov 25, 2021 2:56 pm

Two charts in the same container with same data shared 1 legend

Is it possible to put two different charts(line and bar) in the same container where each of them uses the same data source and share the same legend which is placed at the mid bottom between two charts.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Two charts in the same container with same data shared 1 legend

Hello Jlong,

Thanks for contacting us with your question.

It should be possible but you would have to turn off any of the legend and at the same time you would lose some functionalities like legend hover effects for one chart.
Demo: https://jsfiddle.net/BlackLabel/0gjyxfca/

Let me know if you have any further questions!
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”