0

I am tweaking the fantastic Gannt chart created by Davide Bacci, i am experienced with Vega-Lite but only learning Vega, and within the text mark below I only need it to appear the once, currently when the same task appears in the dataset the text mark duplicates and layers on top of each other but I need it to only occur the once.

    {
      "type": "text",
      "style": "col",
      "from": {"data": "y_scale"},
      "encode": {
        "update": {
          "align": {
            "value": "left"
          },
          "fill": {
            "signal": "datum.phase == datum.task?'#666666':'#666666'"
          },
          "dx": {
            "signal": "datum.phase != datum.task?'0':'0'"
          },
          "y": {
            "signal": "scale('y',datum.task)+bandwidth('y')/2"
          },
          "text": {
            "signal": "datum.phase == datum.task?upper(datum.task):datum.task"
          },
          "fontWeight": {
            "signal": "datum.phase == datum.task?'bold':'normal'"
          },
          "baseline": {
            "value": "middle"
          },
          "limit": {
            "signal": "taskColumn"
          }
        }
      }
    }

I have tried to tweak the code so it only handles it once but I was unsuccessful, any help appreciated. thank you.

DWard1990
  • 11
  • 1

0 Answers0