Toggle dark mode
ď„‘

Hi,

🎉 V2.0 is out. 

Check out our new release!

M

Reply To: Using gantt chart with datetime

Welcome to Taipy Forums Using Taipy Using gantt chart with datetime Reply To: Using gantt chart with datetime

#236816
Florian JactaFlorian Jacta
Keymaster

Hi Aurélien,

I don’t think you are missing anything. Maybe the format of the dataframe is not good somehow.

This is my CSV file (gantt_chart.csv) based on your data.

,start,end,duration,press,label,color
0,2022-10-22 00:00:00,2022-10-22 01:00:48,1970-01-01 01:00:48,WCINY_16,1303237XSW,#31e374
1,2022-10-22 01:21:48,2022-10-22 03:21:00,1970-01-01 01:59:12,WCINY_16,1735973JET_1736247JET,#c8fb49
2,2022-10-22 03:42:50,2022-10-22 06:06:34,1970-01-01 02:23:44,WCINY_16,54525,#434b
3,2022-10-22 06:28:24,2022-10-22 09:42:46,1970-01-01 03:14:22,WCINY_16,1341533XSW,#16552c
4,2022-10-22 10:04:36,2022-10-22 15:55:00,1970-01-01 05:50:24,WCINY_16,1303237XSW,#8d1032
5,2022-10-22 16:17:20,2022-10-22 18:13:03,1970-01-01 01:55:43,WCINY_16,1212583XSW,#db8572
6,2022-10-22 18:33:51,2022-10-22 22:57:51,1970-01-01 04:24:00,WCINY_16,1735973JET_1736247JET,#49e61c

And this is the code I have to visualize the Gantt chart.

import pandas as pd
from taipy import Gui

tp_ganttchart_description = pd.read_csv(“gantt_chart.csv”)

Gui(‘<|{tp_ganttchart_description}|chart|type=bar|orientation=h|x[1]=duration|base[1]=start|y[1]=press|text[1]=label|color[1]=color|>‘).run()

On my end, the chart seems to look good. Please tell me if with this code and CSV file, the chart is showing properly.

If you need more specific charts for your use case, please also tell us. We will be happy to help you on that.

Florian
florian.jacta@taipy.io
Customer Success Engineer