简体   繁体   中英

Deneb plot (Vega-Lite) for Power BI: How to use an free scale y-axis with facet

I am using Deneb custom visual to repeat visual for different tasks. Is it possible to only show the relevent Y-axis values. Following data is used:

在此处输入图像描述

The following Vega-lite JSON is used:

{
  "data": {"name": "dataset"},
  "mark": {
    "type": "bar",
    "opacity": 1,
    "tooltip": true,
    "cornerRadius": 15
  },
  "encoding": {
    "x": {
      "field": "Earliest StartDate",
      "type": "temporal"
    },
    "y": {
      "field": "MachGrpCode",
      "type": "nominal",
      "axis": {
        "title": null,
        "grid": true,
        "tickBand": "extent"
      }
    },
    "row": {
      "field": "ProdHeaderOrdNr",
      "header": {"labelAngle": 0}
    }
  },
  "resolve": {
    "axis": {
      "x": "independent",
      "y": "independent"
    }
  }
}

Which results in: 在此处输入图像描述

Is it possible to only use the relevent task values (for 022 --> erase 6700 row)?

From what I've seen , this is a Vega bug . The recommended work-around is to use vconcat with a filter transform . If you only have a few ProdHeaderOrdNr , this is doable.

固定的

Open the Chart in the Vega Editor

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM