โ06-23-2022 01:51 PM
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๐
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'
)
โ06-27-2022 02:34 AM
Hi @Amy Shapiroโ,
Plotly Express is the easy-to-use, high-level interface to Plotly, which operates on various types of data and produces easy-to-style figures. With a px.timeline(introduced in version 4.9), each data point is represented as a horizontal bar with a start and end point specified as dates.
By default, the px.timeline function sets the X-axis to be type=date so it can be configured like any time-series chart.
Plotly Express also supports a general-purpose px.bar function for bar charts.
For more modifications, please have a read at this article.
โ06-27-2022 09:06 AM
Hi @Kaniz Fatmaโ ,
Thanks for the response. I use altair for plotting, and as you can see I can easily make the Gantt chart in python in altair using the above code. I'm specifically asking about getting this in the dashboard functionality of Databricks, which seems like it only supports Databricks plotting. Is it possible to use python to create dashboards?
Thanks,
Amy
โ06-27-2022 09:13 AM
Hi @Amy Shapiroโ Let me check and get back to you.
โ08-26-2022 10:04 PM
Hi @Amy Shapiroโ
Hope you are doing great!
I just wanted to check in if you were able to resolve your issue or do you need more help. We'd love to hear from you.
Thanks!
โ11-22-2023 02:23 PM
Hi @Vidula,
I don't think this has been resolved.
I think gantt charts would look fantastic in a Lakeview Dashboard.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group