# Adjusting rangeslider height

Hi forum,

I am trying to add a rangeslider to a time series plot, but the slider seems to tall for my plot.
Is there a option for us to adjust the height of the rangeslider?

Thanks!

Hi @Pill, I don’t know whether this will help:

You need to update the xaxes and specify a “number between or equal to 0 and 1.” This number will be “the height of the range slider as a fraction of the total plot area height.” This info can be found in the layout.xaxis documentation.

### Example implementation:

Using the python plotly example for Rangeslider and Selector.

``````import plotly.graph_objects as go
import pandas as pd

"https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
df.columns = [col.replace("AAPL.", "") for col in df.columns]

# Create figure
fig = go.Figure()

go.Scatter(x=list(df.Date), y=list(df.High)))

# Set title
fig.update_layout(
title_text="Time series with range slider and selectors"
)

# Add range slider
fig.update_layout(
xaxis=dict(
rangeselector=dict(
buttons=list([
dict(count=1,
label="1m",
step="month",
stepmode="backward"),
dict(count=6,
label="6m",
step="month",
stepmode="backward"),
dict(count=1,
label="YTD",
step="year",
stepmode="todate"),
dict(count=1,
label="1y",
step="year",
stepmode="backward"),
dict(step="all")
])
),
rangeslider=dict(
visible=True
),
type="date"
)
)

# This is the line you must add before showing the plot
# The rangeslider now has a height that is 40% of the total plot area height
fig.update_xaxes(rangeslider_thickness = 0.4)

fig.show()
``````

### Change the thickness parameter:

``````....

# This is the line you must add before showing the plot
# The rangeslider now has a height that is 10% of the total plot area height
fig.update_xaxes(rangeslider_thickness = 0.1)

fig.show()
``````

### Result:

Hi @lloyd, `rangeslider_thickness` works great! Thank you!
{"ft_lang_label":"__label__en","ft_lang_prob":0.68565416,"math_prob":0.8417817,"size":1970,"snap":"2022-40-2023-06","text_gpt3_token_len":509,"char_repetition_ratio":0.14242116,"word_repetition_ratio":0.39361703,"special_character_ratio":0.26395938,"punctuation_ratio":0.1679198,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9965164,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-10-01T18:41:49Z\",\"WARC-Record-ID\":\"<urn:uuid:b867ad93-8acd-409b-86fb-77eb8039d200>\",\"Content-Length\":\"27514\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:39c6310b-add7-4e23-8de9-0a206b40bc23>\",\"WARC-Concurrent-To\":\"<urn:uuid:43b70574-909d-439c-b790-c763d2f20219>\",\"WARC-IP-Address\":\"184.105.176.45\",\"WARC-Target-URI\":\"https://community.plotly.com/t/adjusting-rangeslider-height/44796\",\"WARC-Payload-Digest\":\"sha1:EZIKAQ3CHJLM7XQSQEN4VT3IQTTDW6LF\",\"WARC-Block-Digest\":\"sha1:2CUFABSDFTOTEKRDGN7TIYKYGX422RFG\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-40/CC-MAIN-2022-40_segments_1664030336880.89_warc_CC-MAIN-20221001163826-20221001193826-00713.warc.gz\"}"}