question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

timeUnit step does not respect cross month bins

See original GitHub issue

See the following animated gif: timeunit_step With a new month it starts a new bin The first bin (not sure if it still called bins with timeUnit steps), goes from 31 dec to jan 3 and the 2nd bin jan 1 tot jan 4.

This leads to overlapping bins. I’m not sure if this is intended. The used spec (derivitated from https://vega.github.io/vega-lite/docs/timeunit.html#example-customizing-step)

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "data": {
    "values": [
      {"date": "Sat, 31 Dec 2011 00:00:00", "distance": 1},
      {"date": "Sat, 31 Dec 2011 00:01:00", "distance": 1},
      {"date": "Sat, 31 Dec 2011 00:02:00", "distance": 2},
      {"date": "Sun, 01 Jan 2012 00:00:00", "distance": 1},
      {"date": "Sun, 01 Jan 2012 00:01:00", "distance": 1},
      {"date": "Sun, 01 Jan 2012 00:02:00", "distance": 2},
      {"date": "Mon, 02 Jan 2012 00:03:00", "distance": 1},
      {"date": "Mon, 02 Jan 2012 00:04:00", "distance": 4},
      {"date": "Mon, 02 Jan 2012 00:05:00", "distance": 2},
      {"date": "Tue, 03 Jan 2012 00:06:00", "distance": 5},
      {"date": "Tue, 03 Jan 2012 00:07:00", "distance": 2},
      {"date": "Tue, 03 Jan 2012 00:08:00", "distance": 6},
      {"date": "Tue, 03 Jan 2012 00:09:00", "distance": 4},
      {"date": "Wed, 04 Jan 2012 00:10:00", "distance": 1},
      {"date": "Wed, 04 Jan 2012 00:11:00", "distance": 1},
      {"date": "Wed, 04 Jan 2012 00:12:00", "distance": 3},
      {"date": "Thu, 05 Jan 2012 00:13:00", "distance": 0},
      {"date": "Thu, 05 Jan 2012 00:14:00", "distance": 2},
      {"date": "Thu, 05 Jan 2012 00:15:00", "distance": 3}
    ]
  },
  "mark": "bar",
  "encoding": {
    "stroke": {
      "condition": {"selection": "HOVER", "value": "black"},
      "value": null
    },
    "x": {
      "field": "date",
      "type": "temporal",
      "timeUnit": {"unit": "yearmonthdate", "step": 3}
    },
    "y": {"field": "distance", "type": "quantitative", "aggregate": "sum"},
    "tooltip": [
      {
        "field": "yearmonthdate_step_3_date",
        "type": "temporal",
        "title": "Datum start"
      },
      {
        "field": "yearmonthdate_step_3_date_end",
        "type": "temporal",
        "title": "Datum end"
      }
    ],
    "color": {"field": "distance", "type": "quantitative", "aggregate": "sum"}
  },
  "selection": {"HOVER": {"empty": "none", "on": "mouseover", "type": "single"}}
}

Open the Chart in the Vega Editor

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
mattijncommented, May 19, 2020

Oh perfect! I missed that issue. You (plural) are doing great, take it easy!

0reactions
domoritzcommented, May 19, 2020

Coming soon: https://github.com/vega/vega-lite/issues/6348.

It should be pretty straight forward but I haven’t had cycles for it yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

LinearLayout | Android Developers
android:alwaysDrawnWithCache, Defines whether the ViewGroup should always draw its children using their drawing cache or not.
Read more >
NetCDF Climate and Forecast (CF) Metadata Conventions
Since climate and forecast data are often not simply representative of points in space/time, other extensions provide for the description of coordinate ...
Read more >
CY 2023 Payment Policies Under the Physician Fee Schedule ...
This major proposed rule addresses: changes to the physician fee schedule (PFS); other changes to Medicare Part B payment policies to ensure ...
Read more >
Demantra Demand Management to EBS Integration
Demantra Demand Management to EBS Integration. This chapter overviews integration processes that synchronize or move data between the Oracle Demantra and ...
Read more >
Cross-Scale Causality and Information Transfer in Simulated ...
An information-theoretic approach for detecting causality and information transfer was applied to phases and amplitudes of oscillatory ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found