# Gantt chart not displaying the bars

**URL:** <https://community.plotly.com/t/gantt-chart-not-displaying-the-bars/55449>\
**Category:** 📊 Plotly Python\
**Created:** [August 11, 2021, 6:20am UTC](https://community.plotly.com/t/gantt-chart-not-displaying-the-bars/55449 "2021-08-11T06:20:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VishalSubramanyam](https://avatars.discourse-cdn.com/v4/letter/v/e36b37/32.png) [@VishalSubramanyam](https://community.plotly.com/u/VishalSubramanyam)\
**Post date:** [August 11, 2021, 6:20am UTC](https://community.plotly.com/t/gantt-chart-not-displaying-the-bars/55449/1 "2021-08-11T06:20:34Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/c/cab46c6814a5cad6c0f6e4c6d07f3b7c20d3f0f0.png)  
My code:

```auto
import plotly.graph_objs as go
import plotly.figure_factory as ff
import plotly.express as px
import pandas as pd
import numpy as np

import hashlib

df = pd.DataFrame({'Task': ['m','m','l','m','l','m','m','l','m','l','m','m','h','m','h'], 'Start':[3,4,6,9,10,0,1,2,2,4,6,7,8,8,10], 'Finish':[4,6,10,10,12,1,2,4,3,5,7,8,10,9,11], 'TJO':['000','001','002','003','004','100','101','102','103','104','110','111','112','113','114']})
tempList = []
for index in df.index:
    tempList.append(df['TJO'][index][0:2])
df['TJ'] = tempList
print(df)
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", color="TJ")
fig['layout']['xaxis']['tickformat'] = '%L'
fig['layout']['xaxis']['tickvals'] = np.arange(0,20)
fig['layout']['xaxis']['ticktext'] = list(range(len(fig['layout']['xaxis']['tickvals'])))
fig.layout.xaxis.rangeselector = None
fig.layout.xaxis.type = 'linear'
fig.show()

```

The graph is empty. What should I do?

---

<div class="post-metadata">

**Author:** ![Palich239](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/palich239/32/26033_2.png) [@Palich239](https://community.plotly.com/u/Palich239)\
**Post date:** [November 12, 2023, 8:48pm UTC](https://community.plotly.com/t/gantt-chart-not-displaying-the-bars/55449/2 "2023-11-12T20:48:36Z")

</div>

The same problem when using Docker. Everything works fine without Docker. I use **ff.create\_gantt**. I don’t know what to do… I tried different versions of the library - all to no avail. Maybe the thing is that the main system is Win, and in Docker - Ubuntu? But it sounds like nonsense. I use plotli.js (I save the js code from python to the html page).

---

<div class="post-metadata">

**Author:** ![Palich239](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/palich239/32/26033_2.png) [@Palich239](https://community.plotly.com/u/Palich239)\
**Post date:** [April 10, 2024, 1:37pm UTC](https://community.plotly.com/t/gantt-chart-not-displaying-the-bars/55449/3 "2024-04-10T13:37:13Z")

</div>

Solved! Just use .zfill(19) into values of X-axis of timeline
