Multiple Bar graphs with shared X axis but different layout

Hello Gurus

Could someone help me on this. I’m trying to plot a two bar graphs into one canvas with shared X- Axis.
Bar Graph 1 : 2 traces and barmode type is ‘relative’
Bar graph 2: 1 trace and , just a simple bar chart.
Both these graphs share same X-Coordinates, but I’m unable to plot them as the layout for the first graph is different from the second. Below is the screenshot that I want to combine with shared X-Axis.

This example: https://plot.ly/javascript/subplots/#stacked-subplots-with-a-shared-x-axis should help you get started.

Thanks for the response. I already saw this post. It doesn’t explain how to have multiple layouts in the same plot.

In my case, I have
plot 1 => with 2 bar graphs and bartype=overlay
plot 2 => 1 bar graph

I want both of them displayed with common x axis. The examples shown in the post only allows 1 common layout for all the plots when combined into subplots.