Define task_text as part of raw data?

This forum post shows how to use a function to define the text in the progress bar:

gantt.templates.task_text=function(start, end, task){
return ‘Some words’;

But how can I define this as part of my raw data. i need to calculate some content for the chart, but all the calculations have to be on the back end.

In other words, can i do soemthing like this?

{“id”:3, “text”:“task name”, “content”: “Some words”, “start_date”:“18-03-2019”, “duration”:“2”, “parent”:“1”, “progress”: 0.0, “open”: true},

Hello Jeff,
You can display any task property or even HTML elements instead of the standard task text.
Here is an example:

If you want to modify the task text on the backend after loading the data, you need to update tasks. Here is another example:

Please, clarify if you need something else.

I really need the whole thing to be read-only.
When I ran the example code, it changed both the sidebar and the contents of the task. I want the sidebar to not change.

What I want is to have the task name on the left be different from the text in the schedule bar. The schedule component is going to contain some meta-data about the task.

Hello Jeff,
Thank you for the clarification.
Have you tried the first snippet? (
The task_text template doesn’t change the data, it only modifies what is displayed in the taskbar: