Skip to main content

taskTypes

Description

An array of objects containing the tasks types data

Usage

taskTypes?: [
{
id: string,
label?: string
}
];

Parameters

  • id - (required) the task ID which can be one of the following: "task", "summary", "milestone" or any other custom task type
  • label - (optional) the task title

Example

import { getData } from "./common/data";
import { Gantt } from "wx-react-gantt";
import "wx-react-gantt/dist/gantt.css";
import React from 'react';

const App = () => {
const data = getData();
const taskTypes = [
{ id: "task", label: "Project Task" },
{ id: "summary", label: "Project" },
];

return <Gantt tasks={data.tasks} taskTypes={taskTypes} />;
};

export default App;
info

Instructions with an example of adding a new custom task type you can find here: Adding a custom task type