plotly / plotly/react-plotly.js

onClick event with choropleth

Open
#265 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
138
Avg merge
3d 2h
Merged PRs (30d)
4

Description

Hello. I have set up a very simple choropleth chart that shows me information about the clicked city in my state. It works great! However, if I drag the map around, as soon as I release my mouse button the event will be fired as well. Is there any way to prevent an onClick event if the map is moved/dragged around? I want to fire onClick only when there's a click and an immediate release, ie no chart movement. Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

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

No file, test, or entry point is named. First reproduce the choropleth interaction by dragging and releasing the map, then compare it with a click without movement; done means onClick fires only for the latter case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.