Skip to Main Content

Developer Community

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cracking the Code for Multiline Gantt Labels

Paramveer SinghJan 26 2024 — edited Jan 26 2024

Hey there, happy Friday! Hope you're all crushing it in your coding adventures.

Have a Gantt chart, all is well.

For some reason, I am having some difficulty having a new line in the Gantt Chart Label.

Here's the tag:

<template slot="taskMappingTemplate" data-oj-as="task" style="white-space: pre-line;"> 
<oj-gantt-task 
task-id="[[task.data.id]]" 
start="[[task.data.begin]]" 
end="[[task.data.finish]]" 
label="[[task.data.shortDesc]]" 
svg-class-name="[[getSvgClassName(task.data)]]" 
></oj-gantt-task> 
</template>

In JS:

shortDesc = string1 + ā€˜\n’ + string2

On the Label it is showing up as:

How can we get a multiline between the two Strings? I'm guessing it is not possible given the documentation?

Cheers!

Comments
Post Details
Added on Jan 26 2024
0 comments
178 views