Introduction
Bryntum components are data-driven by design—data is not just an enhancement, it is a core requirement. Whether you're rendering a Scheduler, Gantt chart, or Grid, each component depends on well-structured data to function correctly.
This guide serves as an introduction to Bryntum’s data management concepts, helping you understand the underlying data structures, loading mechanisms, and integration strategies needed to build functional and efficient applications.
Let's start by exploring the two main sources of data:
- Inline data
- Remote data
Inline data
The easiest way to feed data into your Bryntum Scheduler Pro is by using inline data. Just as HTML allows inline CSS, you can include the data directly inside the new SchedulerPro({}) instance. Here's how to do it:
new SchedulerPro({
// other configs
resources : [
{ id : 1, name : 'Dan Stevenson' },
{ id : 2, name : 'Talisha Babin' }
],
events : [
{ id : 1, startDate : '2025-01-01', duration : 3, durationUnit : 'd', name : 'Interview' },
{ id : 2, duration : 4, durationUnit : 'd', name : 'Press Conference' }
],
assignments : [
{ event : 1, resource : 1 },
{ event : 2, resource : 2 }
],
dependencies : [
{ fromEvent : 1, toEvent : 2 }
]
});
const App = props => {
const [resource, setResources] = useState([
{ id : 1, name : 'Dan Stevenson' },
{ id : 2, name : 'Talisha Babin' }
]);
const [events, setEvents] = useState([
{ id : 1, startDate : '2025-01-01', duration : 3, durationUnit : 'd', name : 'Interview' },
{ id : 2, duration : 4, durationUnit : 'd', name : 'Press Conference' }
]);
const [assignments, setAssignments] = useState([
{ event : 1, resource : 1 },
{ event : 2, resource : 2 }
]);
const [dependencies, setDependencies] = useState([
{ fromEvent : 1, toEvent : 2 }
]);
return <BryntumSchedulerPro resources={resources} events={events} />
}
<bryntum-schedulerpro :resources="resources" :events="events" :assignments="assignments" :dependencies="dependencies" />
<script setup>
{/* other config */}
const
resources = reactive([
{ id : 1, name : 'Dan Stevenson' },
{ id : 2, name : 'Talisha Babin' }
]),
events = reactive([
{ id : 1, startDate : '2025-01-01', duration : 3, durationUnit : 'd', name : 'Interview' },
{ id : 2, duration : 4, durationUnit : 'd', name : 'Press Conference' }
]),
assignments = reactive([
{ event : 1, resource : 1 },
{ event : 2, resource : 2 }
]),
dependencies = reactive([
{ fromEvent : 1, toEvent : 2 }
])
</setup>
<bryntum-schedulerpro [resources]="resources" [dependencies]="dependencies" [assignments]="assignments" [events]="events"></bryntum-schedulerpro>
@Component()
export class AppComponent {
resources = [
{ id : 1, name : 'Dan Stevenson' },
{ id : 2, name : 'Talisha Babin' }
];
events = [
{ id : 1, startDate : '2025-01-01', duration : 3, durationUnit : 'd', name : 'Interview' },
{ id : 2, duration : 4, durationUnit : 'd', name : 'Press Conference' }
];
assignments = [
{ event : 1, resource : 1 },
{ event : 2, resource : 2 }
];
dependencies = [
{ fromEvent : 1, toEvent : 2 }
]
}
The above config results in the following SchedulerPro:
new SchedulerPro({ appendTo : targetElement, startDate : new Date(2026, 0, 1), endDate : new Date(2026, 1, 10), autoHeight : true, rowHeight : 60, barMargin : 15, eventStyle : 'colored', columns : [ { text : 'Name', field : 'name', width : 160 } ], project : { resources : [ { id : 1, name : 'Dan Stevenson' }, { id : 2, name : 'Talisha Babin' }, { id : 3, name : 'Michael Chen' }, { id : 4, name : 'Sophia Rodriguez' }, { id : 5, name : 'Arjun Mehta' } ], events : [ { id : 1, startDate : '2026-01-01', duration : 3, durationUnit : 'd', name : 'Project Kickoff' }, { id : 2, startDate : '2026-01-04', duration : 4, durationUnit : 'd', name : 'Requirement Gathering' }, { id : 3, startDate : '2026-01-08', duration : 5, durationUnit : 'd', name : 'UI/UX Design' }, { id : 4, startDate : '2026-01-13', duration : 7, durationUnit : 'd', name : 'Backend Development' }, { id : 5, startDate : '2026-01-20', duration : 6, durationUnit : 'd', name : 'Frontend Development' }, { id : 6, startDate : '2026-01-26', duration : 4, durationUnit : 'd', name : 'API Integration' }, { id : 7, startDate : '2026-01-30', duration : 3, durationUnit : 'd', name : 'Testing & QA' }, { id : 8, startDate : '2026-02-02', duration : 2, durationUnit : 'd', name : 'Client Review' }, { id : 9, startDate : '2026-02-04', duration : 3, durationUnit : 'd', name : 'Bug Fixing' }, { id : 10, startDate : '2026-02-07', duration : 2, durationUnit : 'd', name : 'Final Deployment' } ], assignments : [ { event : 1, resource : 1 }, { event : 2, resource : 2 }, { event : 3, resource : 3 }, { event : 4, resource : 4 }, { event : 5, resource : 5 }, { event : 6, resource : 3 }, { event : 7, resource : 2 }, { event : 8, resource : 1 }, { event : 9, resource : 4 }, { event : 10, resource : 5 } ], dependencies : [ { fromEvent : 1, toEvent : 2 }, { fromEvent : 2, toEvent : 3 }, { fromEvent : 3, toEvent : 4 }, { fromEvent : 4, toEvent : 5 }, { fromEvent : 5, toEvent : 6 }, { fromEvent : 6, toEvent : 7 }, { fromEvent : 7, toEvent : 8 }, { fromEvent : 8, toEvent : 9 }, { fromEvent : 9, toEvent : 10 } ] } }); Remote data
Remote data can come from a static .json file hosted on a web server (e.g., in the /public folder of your project or on a CDN), or it can be retrieved dynamically from a server through an API call (e.g., data.php).
If you have a /data.php endpoint, you can access the data as follows:
new SchedulerPro({
project : {
loadUrl : '/data.php',
autoLoad : true // auto load on initialization
}
})
// SchedulerProConfig.tsx
import { BryntumSchedulerProProps } from "@bryntum/schedulerpro-react";
const schedulerproProps: BryntumSchedulerProProps = {
// other config
project : {
transport : {
loadUrl : 'data.json' // can be replaced with an API endpoint (e.g. read.php)
},
autoLoad : true // auto load on initialization
}
};
export { schedulerproProps };
import { schedulerproProps } from "./schedulerproProps";
// App.tsx
const App = props => {
return <BryntumSchedulerPro {...schedulerproProps} />
}
<script setup lang="ts">
import { BryntumSchedulerPro } from '@bryntum/schedulerpro-vue-3';
import { schedulerproConfig } from './AppConfig.ts';
</script>
<template>
<bryntum-schedulerpro v-bind="schedulerproConfig" />
</template>
import { type BryntumSchedulerProProps } from '@bryntum/schedulerpro-vue-3';
export const schedulerproConfig : BryntumSchedulerProProps = {
// other config
project : {
transport : {
loadUrl : 'data.json' // can be replaced with an API endpoint (e.g. read.php)
},
autoLoad : true // auto load on initialization
}
};
<bryntum-gantt-project-model
#project
[startDate]="projectModelProps.startDate!"
[endDate]="projectModelProps.endDate!"
[calendar]="projectModelProps.calendar!"
[loadUrl]="projectModelProps.loadUrl!"
[autoLoad]="projectModelProps.autoLoad!"
></bryntum-gantt-project-model>
<bryntum-gantt
#gantt
[project]="project"
></bryntum-gantt>
// app.config.ts
import { BryntumGanttProjectModelProps } from '@bryntum/gantt-angular';
export const projectModelProps : BryntumGanttProjectModelProps = {
loadUrl : 'data.json', // can be replaced with an API endpoint (e.g. read.php)
autoLoad : true,
autoSetConstraints : true
};
// app.component.ts
import { projectModelProps } from './app.config';
export class AppComponent implements AfterViewInit {
public projectModelProps = projectModelProps;
}
The project approach populates all stores in one request, reducing the API calls when loading the data. Take a look at the load request or response structure to understand how to work with the project.
const schedulerPro = new SchedulerPro({ project : { autoLoad : true, transport : { load : { url : 'data/SchedulerPro/examples/guides/readme/intro.json' } } }, style : 'font-size:0.85em', resourceImagePath : 'data/Scheduler/images/transparent-users/', appendTo : targetElement, autoHeight : true, eventStyle : 'rounded', startDate : new Date(2025, 2, 23, 4), endDate : new Date(2025, 2, 26), // Custom view preset, with more compact display of hours viewPreset : { base : 'hourAndDay', tickWidth : 35, headers : [ { unit : 'day', dateFormat : 'ddd DD/MM' //Mon 01/10 }, { unit : 'hour', dateFormat : 'H' } ] }, features : { timeRanges : { narrowThreshold : 10, enableResizing : true }, resourceNonWorkingTime : true, cellEdit : true, filter : true, regionResize : true, dependencies : true, dependencyEdit : true, percentBar : true, group : { field : 'type', headerHeight : 30 }, sort : 'name', eventTooltip : { header : { title : 'Information', titleAlign : 'start' }, tools : [ { cls : 'fa fa-trash', handler() { this.eventRecord.remove(); this.hide(); } }, { cls : 'fa fa-edit', handler() { schedulerPro.features.taskEdit.editEvent(this.eventRecord); } } ] } }, columns : [ { type : 'resourceInfo', text : 'Name', showEventCount : true, width : 220 }, { type : 'action', text : 'Actions', actions : [{ cls : 'fa fa-fw fa-plus', tooltip : 'Add task', onClick : async({ record }) => { await schedulerPro.project.addEvent({ name : 'New task', startDate : schedulerPro.startDate, duration : 4, durationUnit : 'h', resourceId : record.id }); schedulerPro.features.taskEdit.editEvent(schedulerPro.eventStore.last); } }, { cls : 'fa fa-fw fa-cog', tooltip : 'Settings', onClick : ({ record }) => Toast.show('TODO: Show a cool settings dialog') }, { cls : 'fa fa-fw fa-copy', tooltip : 'Duplicate resource', onClick : ({ record }) => { schedulerPro.resourceStore.add(record.copy({ name : record.name + ' (copy)' })); } }] } ] }); You can also use axios or fetch API:
async function loadData() {
const response = await fetch('backend/load.php');
return await response.json();
}
// Extract data from loadData() via `await` or `.then`
// Assuming it has been saved to `data`
const schedulerpro = new SchedulerPro({
project : {
inlineData : data
}
})
// or
schedulerpro.project.inlineData = data;
Working with remote data is more complex as it offers multiple ways of interaction. Let's move on to the next topic to learn more about how stores work.
Continue reading: Understanding the Store