plotly / plotly/plotly.js

Allow indexing data in pmeta using x and y coordinates

Open
#4,145 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

Problem Description.

Displaying a heatmap, I'd like to include in the hover box some data which depends only on the X (column) or Y (row).

Describe the solution you'd like

Allow specifying %{data.pmeta.foo.%{x}} and/or %{data.pmeta.bar.%{y}} in the hovertemplate.
In general, if a path element is in the format %{...}, then evaluate it, and use this as the next key.

Describe alternatives you've considered

It is possible to specify per-entry hover text for a heatmap, but this would require precomputing and sending much more data between the client and the server (N * M complete texts instead of N + M text fragments).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the hovertemplate handling and how pmeta paths are resolved for heatmaps. Determine how x- and y-based path elements should be evaluated, then verify that hover text can use the requested %{data.pmeta.foo.%{x}} and %{data.pmeta.bar.%{y}} forms without requiring per-entry text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.