c3js / c3js/c3

Enabling zoom causing errors on double click of the line chart

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

Hi,

I'm trying to use zoom functionality with the line chart.

Following my chart configuration.

```
{
axis: {
x: {
tick: {
format: date => {
return this.formateX(date as Date);
},
multiline: false
},
type: "timeseries"
},
y: {
tick: {
format: d => (+d.toFixed(2)) + "h"
}
}
},
bindto: element,
data: {
json: graphData,
type: "line"
},
legend: {
show: false
},
point: {
show: false
},
zoom: {
enabled: true
}
}
```
I'm able to generate line chart with the above configuration, but not able to zoom the chart by double click on any point of the line.

Console says following error:
![screen shot 2017-09-20 at 5 26 58 pm](https://user-images.githubusercontent.com/6123002/30642637-464ed42c-9e29-11e7-8d9a-08d7387056af.png)

![screen shot 2017-09-20 at 5 26 51 pm](https://user-images.githubusercontent.com/6123002/30642700-83e37fe0-9e29-11e7-9e35-01eafe125001.png)

**Updated:**
JSFiddle: https://jsfiddle.net/q28bo33g/

* **C3 version**: 0.4.11
* **D3 version**: 3.5.7
* **Browser**: Chrome 61.0
* **OS**: MAC

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.