I am building a sample app based on the example given in gnatt chartt as per the jet cookbook:
https://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html?component=gantt&demo=selection
Whenever a task is clicked, the task number is updated in the UI right above the chart. I associated a selectionListener to the gnatt as below. Now How to get the label or row object associated with it. I want the entire row data associated with that task.
<oj-gantt id="gantt" aria-label="Project Gantt"
start="[[projectStartDate]]"
end="[[projectEndDate]]"
gridlines.vertic@al="visible"
selection="{{selectedNodesValue}}"
selection-mode="[[selectionValue]]"
major-axis='{
"scale": "months",
"zoomOrder": ["quarters", "months", "weeks", "days"]
}'
minor-axis='{
"scale": "weeks",
"zoomOrder": ["quarters", "months", "weeks", "days"]
}'
on-selection-changed="[[selectionListener]]"
rows="[[data]]"
style="width:100%;height:300px">
</oj-gantt>
self.selectionListener = function(event) {
var items = "";
var value = event['detail']['value'];
if(value && value.length > 0) {
items = value.join(", ");
}
if (items === "")
items = "none";
self.selectedObjects(items);
};
Thank for your help.