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.

tickRound: false should also disable rounding on gridlines

See original GitHub issue

~tickRound is supported, but the corresponding gridRound is missing. If we set tickRound: true and have grid lines, the ticks and grid lines doesn’t line up.~

When tickRound is set to false, tick positions are not rounded but grid lines are still rounded. This result in misalignment between ticks and gridlines.

image

{
  "$schema": "https://vega.github.io/schema/vega-lite/v4.json",
  "width": 600,
  "height": 200,
  "data": {"url": "data/unemployment-across-industries.json"},
  "mark": "bar",
  "encoding": {
    "x": {
      "timeUnit": "yearquarter",
      "field": "date",
      "band": 0.6,
      "type": "temporal",
      "axis": {"format": "%Y", "tickRound": false}
    },
    "y": {
      "aggregate": "sum",
      "field": "count",
      "type": "quantitative",
      "axis": {"title": "count"}
    }
  }
}

In this I’d like the tick & grid line to appear exactly at the middle between bars, but right now it looks like this: image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kanitwcommented, Feb 1, 2020

If we wanna change how tick round works, move to Vega?

0reactions
domoritzcommented, Feb 27, 2020

I suppose we don’t want a separate gridRound method, right?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Axis | Vega-Lite
Opacity of the ticks. tickRound, Boolean. Boolean flag indicating if pixel position values should be rounded to the nearest integer. Default value: true....
Read more >
Stop showing rounded numbers
Some numbers having one or more decimal places may appear to rounded on your worksheet. If this isn't the result of applying a...
Read more >
Can I prevent a Classroom rubric from rounding down ...
When I create rubrics, I have very specific scores I want for each category. But the rubric keeps rounding down some of the...
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