Newest version of Deneb does not handle Scrolling when data overflows

44 Views Asked by At

I'm very new to Deneb. I have the latest version of the visual for my Power BI. The dataset that I'm using has a lot of data and according to the resources here: https://deneb-viz.github.io/scrolling-overflow the scrolling should happen automatically. In my case it doesn't. Instead, all of the data is squished on the y-axis. I'm most likely missing something. Is there a way to enable scrolling when overflow occurs?

I've tried looking for a configuration that adjusts the container size, but was unsuccessful. I watched a Youtube video that has an example of scrolling. In my case, I just need the simple scrolling that comes with Deneb. I'm currently using just a really simple dataset with a lot of data, just to see if I can get scrolling working.

1

There are 1 best solutions below

0
davidebacci On BEST ANSWER

It is working as designed. You forgot to add a step size to your spec:

{
  "data": {"name": "dataset"},
  "height": {"step": 10},
  "layer": [
    {
      "mark": {
        "type": "bar",
        "opacity": 0.3,
        "tooltip": true
      },
      "encoding": {
        "x": {"field": "TotalCost"}
      }
    },
    {
      "mark": {
        "type": "bar",
        "tooltip": true
      },
      "encoding": {
        "x": {
          "field": "TotalCost__highlight"
        },
        "opacity": {
          "condition": {
            "test": {
              "field": "__selected__",
              "equal": "off"
            },
            "value": 0
          },
          "value": 1
        }
      }
    }
  ],
  "encoding": {
    "y": {
      "field": "WO",
      "type": "nominal"
    },
    "x": {
      "type": "quantitative",
      "axis": {"title": "TotalCost"}
    }
  }
}

enter image description here