Forum Discussion

Ivashamagnus's avatar
Ivashamagnus
Frequent Visitor
2 years ago
Solved

How to visualize sleep segments?

Hello!   Please tell me by what means in Power Bi I can indicate sleep periods on the chart?   I will be glad if you point me in the right direction. Watching tutorial videos doesn't help me. Ex...
  • lbendlin's avatar
    lbendlin
    2 years ago

    There is a learning curve with everything, but I found it to be really short with Deneb.  For your sample data the code is only this:

     

    {
      "data": {"name": "dataset"},
      "mark": {"type": "bar"},
      "encoding": {
        "x": {
          "field": "Date",
          "type": "nominal"
        },
        "y": {
          "field": "Start",
          "type": "temporal"
        },    "y2": {
          "field": "End"
        }
    
      }
    }

    and the result is this