here my plot code:
source = ColumnDataSource(data=dict(x=,y=,height=))
plot = figure(plot_height=600, plot_width=800, title="", toolbar_location=None, tools=[hover],x_range=industry,y_range=[0,2000])
p=plot.rect(x=‘x’,y=‘y’,width=.8,height=‘height’,source=source)
I have three different x_range which should be changed when I select different x_axis:
x_axis=Select(title=‘X axis’,options=sorted(axis_map.keys()),value=‘Current Industry’)
here is my update function:
def update(attrname,old,new):
plot.xaxis.axis_label=x_axis.value
plot.yaxis.axis_label=‘numbers’
source.data=dict(
x=axis_map[x_axis.value],
y=height_map[x_axis.value],
height=height_map[x_axis.value]*2.0
)
question:
I wish to change my rect’s x value and figure’s x_range value at the same time in every update. But I can’t find a way to it.