c3js / c3js/c3

select() API function toggles point, rather than selecting/unselecting it

Open
#2,155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

* **C3 version**: 0.4.15
* **D3 version**: 3.5.17
* **Browser**: Chrome 60
* **OS**: Mac OSX 10.11.6

jsfiddle: https://jsfiddle.net/7d8n838t/31/

The intended result here is that if you hover over a line point, it and the associated bar will get the `selected` effect. Same should happen if you hover over the bar.

However, the current problem is that if your cursor travels from the point to the associated bar, or vice versa, there is a good chance that the `select` effect will not be re-triggered for the line point.

I haven't spotted the issue in the source code, but it seems like the circle's selectedness is being toggled rather than set to the appropriate boolean value.

Contributor guide

Open the contributing guide

Research direction

Start with the select() API implementation and reproduce the behavior using the linked JSFiddle in Chrome. Trace selection changes when moving between the line point and its associated bar; done means both elements consistently receive the selected effect in either direction without relying on a toggle state.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.