synmetrix icon indicating copy to clipboard operation
synmetrix copied to clipboard

Categories in tooltips

Open kapitation opened this issue 2 years ago • 1 comments

Categories should be visible in tooltip by value: to make this work we have to pivot categories. 127776264-5fcbd243-4f1c-4722-8612-32dfb6f8e59f

kapitation avatar Apr 27 '22 13:04 kapitation

Example conf:

        {
          "mark": {"type": "rule"},
          "transform": [{"pivot": "Events\\.eventType", "value": "Events\\.count", "groupby": ["Events\\.timestampHour"]}],
          "name": "tooltip",
          "selection": {
            "hover": {
              "type": "single",
              "empty": "none",
              "on": "mouseover",
              "nearest": false
            }
          },
          "encoding": {
            "x": {
              "field": "Events\\.timestampHour",
              "type": "temporal",
              "title": null,
              "scale": {"domain": {"selection": "brush"}, "type": "time"}
            },
            "tooltip": [
              {
                "field": "Events\\.timestampHour",
                "type": "temporal",
                "title": "Events Timestamp Hour",
                "format": "%y, %b %d, %a, %H:%M"
              },
              {
                "field": "NEW_ANOMALIES_GENERATED",
                "type": "quantitative"
              },
             {
                "field": "NEW_INSIGHTS_GENERATED",
                "type": "quantitative"
              }
            ],
            "color": {
              "condition": {
                "selection": {"not": "hover"},
                "value": "transparent"
              }
            }
          }
        }

ifokeev avatar Apr 27 '22 14:04 ifokeev

not actual

ifokeev avatar May 16 '23 10:05 ifokeev