c3js / c3js/c3

Ability to increase the clickable area of points in the additional y-axis chart

Open
#1,141 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

When an additional y-axis chart is opened in iPad, it is not responsive enough for the data point click handler to trigger when tapped on it.

This is because the minimum distance is hard coded and cannot be configured. Can this be exposed to be configurable when calling c3.generate method?

Code reference:

data.js

```
c3_chart_internal_fn.findClosest = function (values, pos) {
var $$ = this, minDist = 100, closest;
```

interaction.js

```
// Show cursor as pointer if point is close to mouse position
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < 100) {

// select if selection enabled
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < 100) {
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.