admin管理员组

文章数量:1122832

for heatmap like that where we show max value per row enter image description here we use

"fill": [
        {
         "test": "datum['MySumma'] == datum['max']",
         "value": "white"
         }

maybe it's not good, so please give an idea how to do it better, but if it's ok then we need something like

"fill": [
            {
              "test": "contrast('white', datum.fill) > contrast('black', datum.fill)",
              "value": "white"
            },
            {"value": "black"}
          ]

so the question is: how instead of "value": "white" from first snippet use test contrast from second snippet?

i've read vega site but can't find a solution

本文标签: vega mark text fill condition based on another conditionStack Overflow