Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for tooltips schema property #14

Open
SamGRosen opened this issue Jul 1, 2021 · 0 comments
Open

Add support for tooltips schema property #14

SamGRosen opened this issue Jul 1, 2021 · 0 comments

Comments

@SamGRosen
Copy link
Member

SamGRosen commented Jul 1, 2021

Tooltips are an important aspect for reading visualization. Most of the functionality is already present with WebGLVis.getClosestPoint. This method outputs to WebGLVis.dataWorkerStream and can be used for displaying the tooltip.

Implement the tooltips schema property on a track level where a value of 0 is no tooltips, 1 is always show tooltips, and any number between is begin showing tooltips when zoomed to that level, e.g. a value of 0.5 means show tooltips when zoomed in to half of the domains.

Example schema:

{
  "defaultData": {
    "day": [1, 2, 3],  
    "price": [10, 22, 35],
  },
 "tracks": [
  {
    "tooltips": 1, // always show tooltips
    "tooltips": 0, // never show tooltips
    "tooltips": 0.1, // show when zoomed in to 10% of domains.
    "mark": "line",
    "x": {
      "attribute": "day",
      "type": "quantitative",
      "domain": [1, 10]
    },
    "y": {
      "attribute": "price",
      "type": "quantitative",
      "domain": [0, 40],
    },
  }
 ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant