✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Show barchart from yaxis2 below linechart from yaxis

Hi there,

I want to plot a lineplot on the primary y axis and a barplot on the secondary yaxis. The Bars should be plotted behind the lines. Which argument am I missing? Thanks very much in advance for any help.


I have the following return function for my graph:

return {'data': traces,
            'layout': dict(title=f'{technology}',
                           xasis={'title': 'time'},
                           yaxis={'title': 'percent of Baseload',
                                  'range': [0, 1.5]},
                           yaxis2={'overlaying': 'y1',
                                   'layer': 'below traces',
                                   'title': 'GWh',
                                   'side': 'right'},