Fixing Y axis 2

Hey there. I am having a funny time trying to fix the second y axis on the following page.

http://ics-webread01.esss.lu.se/

What I want is the range to autofit every few seconds, and then become fixed, but is not working for y axis 2.

intial parameters:
yaxis2: {
title: ‘Proton Rate’,
titlefont: {color: trace2Color},
tickfont: {color: trace2Color},
overlaying: ‘y’,
side: ‘right’,
fixedrange: true

            },

Update code that runs once every 42 frames :

if ((PVFrame[PVNames][traceNum] == 2) || (updatePlots==true)) {
var update = {
‘xaxis.autorange’: true,
‘yaxis.autorange’: true,
‘yaxis2.autorange’: true,
};
Plotly.relayout(plotName, update)
updatePlots==false;
}
else if ((PVFrame[PVNames][traceNum] == 3)) {
var update = {
‘xaxis.autorange’: false,
‘xaxis.fixedrange’: true,
‘yaxis.autorange’: false,
‘yaxis.fixedrange’: true,
‘yaxis2.autorange’: false,
‘yaxis2.fixedrange’: true,
};
Plotly.relayout(plotName, update)

Thanks for any and all insights. :slight_smile:

Can you clarify what you mean by fixed

Fixed as in:

  • does not auto-range as new data comes in, or
  • users can no longer zoom about this particular axis?