Gantt Chart Components #2345
Replies: 2 comments
-
If anyone is interested in contributing this, some info: ECharts is starting work on a gantt series: There's an existing ECharts example here which may be helpful, though would require quite a bit of work to customize + generalize: Our histogram uses a custom ECharts series, which may be helpful to understand how it functions: |
Beta Was this translation helpful? Give feedback.
-
You could perhaps use a Mermaid gantt diagram for this in a custom component (somewhat at least, I guess you would have to iterate the data and writeout the element). Here is a custom component where you can specify the diagram within the tag, but you could modify it to generate the gantt part from data instead. components/Mermaid.svelte <!-- Mermaid.svelte -->
<script context="module">
import mermaid from "mermaid";
</script>
<script>
import { onMount, createEventDispatcher } from "svelte";
export let id;
let config = {
startOnLoad: true
}
const dispatch = createEventDispatcher();
onMount(() => {
if (!id) {
throw new Error("The 'id' prop is required for the Mermaid component.");
}
mermaid.init(
config,
document.getElementById(`mermaid-container-${id}`)
);
// Dispatch an event to let the parent component know that the diagram is rendered
dispatch("mermaidRendered");
});
</script>
<div id={`mermaid-container-${id}`} class={`mermaid-container-${id} pb-4`} style="display: block; margin: auto; width: 50%;">
<slot />
</div>
|
Beta Was this translation helpful? Give feedback.
-
Feature Description
query will be like
Attached example of Gantt chart in x axis i want date/week/month and Y axis task
Beta Was this translation helpful? Give feedback.
All reactions