# Rangeslider two ways

to my understanding the following two lines of code should do the exact same thing:

``````    fig['layout']['xaxis4']=dict(
rangeslider=dict(
autorange=True,
thickness=0.05,
borderwidth=1,
),
)
``````

and

``````    fig['layout']['xaxis4']['rangeslider']=dict(
autorange=True,
thickness=0.05,
borderwidth=1,
),
``````

however the first has the desired effect while the second does some weird stuff.

what can i be doing wrong here ?

i need to use the second one because i need to be able to assign the rangeselector to an arbitrary xaxis.