c3js / c3js/c3

zoom set programmatically disappears when draggin or resizing

Open
#2,613 2 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

Hi All,
in my application, after calling `c3.generate`, I call `zoom([a,b])` to set an initial zoom.

This works fine, but as soon as the user clicks and drags the mouse on the chart, the zoom disappears.

The initial zoom disappears also when `chart.resize()` is called (and in my specific case this happens very often, since users can change the size of the chart container, and `resize()` is the only way to adapt the chart size to its container)

Here's an attached jfiddle : https://jsfiddle.net/ydh162kf/2/

* **C3 version**: 0.7.0
* **D3 version**: 5.9.2
* **Browser**: Chrome 73.0.3683.103
* **OS**: Windows 10

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using c3.generate, the programmatic zoom([a,b]) call, mouse dragging, and chart.resize(), using the linked JSFiddle as the starting point. Trace how zoom state is handled during interaction and resizing; done means the initial zoom remains visible after dragging and repeated resize() calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
d3, javascript
Domain
data-visualization
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.