# Range slider doesn't show up

**URL:** https://community.plotly.com/t/range-slider-doesnt-show-up/12107
**Category:** 📊 Plotly Python
**Created:** [July 26, 2018, 2:24am UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107 "2018-07-26T02:24:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mr.t](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mr.t](https://community.plotly.com/u/mr.t)
#### Post date: [July 26, 2018, 2:24am UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/1 "2018-07-26T02:24:01Z")

</div>

Hi,

I run the following code I found on github:

```
import numpy as np
import pandas as pd

import plotly.graph_objs as go
import plotly.plotly as py
from plotly.offline import plot
 
dates = pd.date_range('01-Jan-2010', pd.datetime.now().date(), freq='D')
df = pd.DataFrame(100 + np.random.randn(dates.size).cumsum(), dates, columns=['AAPL'])

trace = go.Scatter(x=df.index, y=df.AAPL)
data = [trace]
layout = dict(
    title='Time series with range slider and selectors',
    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(),
        type='date'
    )
)
fig = dict(data=data, layout=layout)

plot(fig)

```

Here is the result I get:

 ![51%20PM](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/a/a767fe776ea109adafece597e4decc7c33203e67.png)

As you can see there is nowhere the range slider. Any clue why is this the case?

---

<div class="post-metadata">

### Author: ![derhannes](https://avatars.discourse-cdn.com/v4/letter/d/f9ae1b/32.png) [@derhannes](https://community.plotly.com/u/derhannes)
#### Post date: [July 26, 2018, 9:36am UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/2 "2018-07-26T09:36:47Z")

</div>

Did you try `rangeslider = True`?

---

<div class="post-metadata">

### Author: ![mr.t](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mr.t](https://community.plotly.com/u/mr.t)
#### Post date: [July 26, 2018, 12:34pm UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/3 "2018-07-26T12:34:18Z")

</div>

Do you mean to replace `rangeslider=dict()` `with rangeslider=True`?

Yes I did and I get the following error:

```
ValueError: 
    Invalid value of type 'builtins.bool' received for the 'rangeslider' property of layout.xaxis
        Received value: True

    The 'rangeslider' property is an instance of Rangeslider
    that may be specified as:
      - An instance of plotly.graph_objs.layout.xaxis.Rangeslider
      - A dict of string/value properties that will be passed
        to the Rangeslider constructor
```

---

<div class="post-metadata">

### Author: ![bcd](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@bcd](https://community.plotly.com/u/bcd)
#### Post date: [July 26, 2018, 12:42pm UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/4 "2018-07-26T12:42:38Z")

</div>

Hey @mr.t

Try:

```auto
layout = go.Layout(
    xaxis = dict(
        rangeslider = dict(
            visible = True
        )
    )
)

```

Here is the full attributes [https://plot.ly/python/reference/#layout-xaxis-rangeslider](https://plot.ly/python/reference/#layout-xaxis-rangeslider)

---

<div class="post-metadata">

### Author: ![mr.t](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mr.t](https://community.plotly.com/u/mr.t)
#### Post date: [July 26, 2018, 12:46pm UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/5 "2018-07-26T12:46:41Z")

</div>

@bcd thanks! thought that visible attribute is by default set to True as mentioned in the documentation

---

<div class="post-metadata">

### Author: ![bcd](https://avatars.discourse-cdn.com/v4/letter/b/ec9cab/32.png) [@bcd](https://community.plotly.com/u/bcd)
#### Post date: [July 26, 2018, 12:48pm UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/6 "2018-07-26T12:48:07Z")

</div>

No worries! Could you confirm what plotly version you’re using?

---

<div class="post-metadata">

### Author: ![mr.t](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@mr.t](https://community.plotly.com/u/mr.t)
#### Post date: [July 26, 2018, 12:50pm UTC](https://community.plotly.com/t/range-slider-doesnt-show-up/12107/7 "2018-07-26T12:50:02Z")

</div>

**plotly 3.0.0** installed with pip
