guiqui / react-timeline-gantt

A react Timeline component with virtual rendering
MIT License
537 stars 130 forks source link

Custom Labels on Bars in dataViewPort, Related to Issue #63 #65

Open Belisarith opened 3 years ago

Belisarith commented 3 years ago

63 (Possible solution)

Added the possibility to add customLabels for the tasks in the moving bar view. Therefore, the property customLabel can be entered to the data object as follows:

const data = [{ id: 1, start: new Date('.....'), end: new Data('....'), name: "Title Task 1", customLabel: "My Custom Label" }]

If the customLabel property is set and the option { dataViewPort: { task: { showLabel: true } } } is activated, then the customLabel string is used. If the option is activated and customLabel is missing, the name is used.