Skip to main content

api.getStores()

Description

Gets an object with the DataStore properties of Gantt

Usage

api.getStores(): object;

Returns

The method returns an object with the DataStore parameters:

{
data: DataStore // ( object of parameters )
}

Example

The example below shows how to output DataStore to the console:

import { Gantt } from "@svar-ui/react-gantt";
import { getData } from "./common/data";

export default function Example() {
const data = getData();

function init(api) {
const stores = api.getStores();
console.log("DataStore:", stores);
}

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

Related articles: