help with image colum SVG code

Hello friends!

I'm just starting on this fantastic platform, AppSheet, and I'm currently developing a project management app. I'm trying to include a Gantt chart in my project view table using QuickChart, but I'm encountering some issues. Here's the code I'm trying:

"https://quickchart.io/chart?c=" & encodeurl(
    concatenate(
        "{",
        "\"type\": \"horizontalBar\",",
        "\"data\": {",
        "\"labels\": ", [listado de actividades], ",",
        "\"datasets\": [{",
        "\"data\": [", [inicio de actividades], ",", [fin planeado de actividades], "],",
        "\"backgroundColor\": [",
        "\"rgba(255, 99, 132, 1.0)\", \"rgba(255, 99, 132, 1.0)\", \"rgba(255, 206, 86, 1.0)\", \"rgba(255, 206, 86, 1.0)\", \"rgba(255, 206, 86, 0.2)\", \"undefined\"",
        "]",
        "}],",
        "\"options\": {",
        "\"legend\": {\"display\": false},",
        "\"annotation\": {",
        "\"annotations\": [{",
        "\"type\": \"line\",",
        "\"mode\": \"vertical\",",
        "\"scaleID\": \"x-axis-0\",",
        "\"value\": \"", [plazo_text], "\"",
        "}]",
        "},",
        "\"scales\": {",
        "\"xAxes\": [{",
        "\"position\": \"top\",",
        "\"type\": \"time\",",
        "\"time\": {\"unit\": \"month\"},",
        "\"ticks\": {\"min\": \"new Date(2024-01-01)\", \"max\": \"new Date(2024-12-31)\"}",
        "}]",
        "}",
        "}"
    )
)

Here are the formulas for your columns:

  • Listado de actividades: substitute(concatenate("[", text(list([actividades relacionadas][actividad])), "]"), " ", "")
  • Inicio de actividades: substitute(concatenate("[", text(list([actividades relacionadas][inicio])), "]"), " ", "")
  • Fin planeado de actividades: substitute(concatenate("[", text(list([actividades relacionadas][fin planeado])), "]"), " ", "")
  • Plazo: substitute(concatenate("[", text([plazo]), "]"), " ", "")

These columns are primarily date types, except for the activities, which are text. However, I'm unable to visualize the chart due to the error:

Error: unexpected token -1:2

What am I doing wrong?

0 2 156
2 REPLIES 2
Top Labels in this Space