in the Gantt graphic, i have tried to figure out how to config the code for the dates of each start and finish date i mean this line of the code.
labels: ['Part 1', 'Part 2', 'Part 3', 'Part 4', 'Part 5', 'Part 6','Part 7','Part 8'],
datasets: [{
data: [
[new Date('2021-02-01'),new Date('2021-05-01')],
[new Date('2021-05-10'),new Date('2021-07-01')],
[new Date('2021-04-20'),new Date('2021-11-31')],
[new Date('2021-08-01'),new Date('2021-09-01')],
[new Date('2021-02-10'),new Date('2021-07-01')],
[new Date('2021-07-20'),new Date('2021-11-31')],
[new Date('2021-09-20'),new Date('2021-10-31')],
[new Date('2021-08-20'),new Date('2021-08-31')],
i already create the VC columns to do like the code is on appsheet and my VC generate this:
["2024-05-22","2024-05-22"] , ["2024-05-23","2024-06-08"] , ["2024-05-31","2024-06-28"] , ["2024-06-27","2024-07-05"] , ["2024-07-02","2024-07-08"] , ["2024-07-08","2024-07-24"] , ["2024-07-25","2024-07-27"] , ["2024-07-29","2024-08-12"] , ["2024-08-13","2024-08-20"] , ["2024-08-21","2024-09-03"] , ["2024-09-04","2024-09-14"] , ["2024-06-12","2024-07-12"]
this is my main code on appsheet:
"https://quickchart.io/chart?c=" & ENCODEURL(
CONCATENATE(
'{
"type":"horizontalBar",
"data":{
"labels":["',
substitute([LISTADO DE ACTIVIDADES SS],",",'","'),'"],
"datasets":[{
"data":[',[prueba de fechas]
,'],
"backgroundColor":["red", "purple", "orange", "blue", "green"],
},],
},
"options":{
"legend":false,
"annotation":{
"annotations":[{
"type":"line",
"mode":"vertical",
"scaleID":"x-axis-0",
"value":',
concatenate('"',TEXT([PLAZO], "YYYY-MM-DD"),'"'),
',
"borderColor":"red",
"borderWidth":1,
"label":{
"enabled":true,
"content":"plazo",
"position":"top"
}
},
{
"type":"line",
"mode":"vertical",
"scaleID":"x-axis-0",
"value":"',
TEXT(today(), "YYYY-MM-DD"),
'",
"borderColor":"blue",
"borderWidth":1,
"label":{
"enabled":true,
"content":"hoy",
"position":"top"
}
}]
},
"scales":{
"xAxes":[{
"position":"top",
"type":"time",
"time":{
"unit":"month"
},
"ticks":{
"min":"',
"2024-01-01",
'",
"max":"',"2024-12-31"
,'"
}
}]
}
}
}'
)
)
I’ve even played around with the Quickchart code so much that I added an additional vertical line to compare the end goal with “today’s” date, but I still haven’t been able to figure out how to reflect the start and end dates of each activity, I feel like I’m 95% of completing the code, but please I need your support.
Here I leave you how the graph looks with one of the projects that is underway.
at the end, i just want to know whats its the proper way to put the string?
Attentive to your valuable comments.
sincerelly,