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.

display data range for histogram hover text

See original GitHub issue

screen shot 2017-10-12 at 6 41 02 pm

In this histogram, my data is binned by month. However, when I hover over a bar, I see the midpoint of the data. I wasn’t sure whether to interpret this as the midpoint of the histogram bar or the start of the histogram bar. I would prefer if this was more explicit and said: October 1-September 1

Issue Analytics

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

github_iconTop GitHub Comments

etpinardcommented, Oct 13, 2017

On the other hand I suspect a lot of users are more interested in clarification, but also when you see Jan 1, 2012 … Jan 5, 2012, 13:45 it could be confusing to know what the bin size actually is, […]

I agree here. Although showing the data range might very useful, making this the default hover behavior is bound to confuse users. Showing the bin range feels less confusing to me.

So if you data is on ten-minute increments, you’d get one-minute precision from the bin, and if your data has increments of 0.05, you’d see 0.01 precision from the bin. I feel like this is acceptable for a first cut though

I agree. It feels acceptable for the first cut. But we should start thinking about those future attributes now. I’m thinking of putting them in the xbins / ybins containers:

x: [/* */],
xbins: {
  hovermode: 'range', // or 'data'
  hoverformat: '' // or maybe hoverprecision ...

And a separate question: thoughts on the format, 0 … 0.99 vs 0 - 0.99?

I prefer 0 - 0.99 as long as we use unicode minuses (not simple - dash) to show negative numbers.

alexcjohnsoncommented, Oct 25, 2017

closed by #2113

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hover text and formatting in Python - Plotly
Over 17 examples of Hover Text and Formatting including changing color, size, log axes, and more in Python.
Read more >
Histogram with tooltips and bars highlighted on mouse over
The following blocks are an edit of Jianan Li's "Basic tooltip" ; bins = d3.histogram() .domain(x.domain()) ;.thresholds(x.ticks(40)). (data).
Read more >
Histogram with tooltip in d3.js
This post shows how to use d3.js to create an histogram with tooltips. It provides explanations and reproducible code. Example with code (d3.js...
Read more >
Histogram | Charts - Google Developers
A histogram is a chart that groups numeric data into bins, displaying the bins as segmented columns. They're used to depict the distribution...
Read more >
How to add hovering annotations to a plot - Stack Overflow
from matplotlib.pyplot import figure, show import numpy as npy from ... lambda event: hover(event, line_info)) # Your data values to plot x1 =...
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 Post

No results found

github_iconTop Related Hashnode Post

No results found