I am building a plot with two y-axes and customJS for an standalone document.
I need to have both axes to change with the selections from two drop down menus.
The left y-axis changes if I do not set the y-range in the vbar, but the other (a scattered plot) does not let me leave y-range empty. Therefore it does not changes when selected another option in menu
Hi @jorge I am afraid it’s not clear from your description what you are trying to achieve, and there is not enough code to speculate. E.g. I can’t tell whether you mean two axes displayed at the same time (one one plot?) Or whether you want to switch/alternate between two plots but only see one at a time. Please provide a more details description of the interaction you are seeking. Some images or diagrams could really help, and certainly more code would really help.
@Bryan I have one graph with two axes. Left axis is a bar plot in the scale of Millions. Right is an scattered plot with data in the hundreds. If I set max y for both plots the axis scale will not adjust to the filters in the drop menu. If I do not set the ymax limit, both axes change with the filters and the scattered basically become a line in the bottom.
You will need to compute and set range start/end yourself. Default auto-ranging behavior is to always keep the original relative scale off the two axes in sync (e.g so that panning and zooming interactively changes both axes together). It seems like now that other use cases are possible it could make sense to offer an option to relax this constraint. A GitHub issue would be appropriate.