Gantt chart in dashboard

Amy
New Contributor II

I'd like to create Gantt charts using the dashboard function. It seems like this could be possible by adding some additional parameters in the bar plot functionality, but I don't see how to do it currently (if there is a way, would love an example!).

 

In altair, this chart type is based on the bar plot, with an additional parameter `x2` that tells where to end the bar.

 

Example (from altair😞

Screen Shot 2022-06-23 at 1.48.05 PM 

import altair as alt
import pandas as pd
 
source = pd.DataFrame([
    {"task": "A", "start": 1, "end": 3},
    {"task": "B", "start": 3, "end": 8},
    {"task": "C", "start": 8, "end": 10}
])
 
alt.Chart(source).mark_bar().encode(
    x='start',
    x2='end',
    y='task'
)