Subchart brush uses main chart clip
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.4k
- Avg merge
- 6d 16h
- Merged PRs (30d)
- 1
Description
In c3_chart_internal_fn.initSubchart (line 5445 ish)
The g element assigned to the brush is given the $$.clipPath variable for a clip, rather than the $$.clipPathForSubchart I'm assuming it should be...
```
context.append("g")
.attr("clip-path", $$.clipPath) // why not $$.clipPathForSubchart?
.attr("class", CLASS.brush)
.call($$.brush);
```
This has consequences when I make the subchart bigger than the main chart, the bottom of the brush starts getting clipped well above the x axis - and sometimes isn't reachable at all. For an example, try http://c3js.org/samples/options_subchart.html and add {size {height: 140}}, at the start of the subchart property.
(If anyone wants to know why I'm making the subchart bigger I'm basically wanting the brushing mechanism and trying to get rid of the main chart)
or jsfiddle here --> http://jsfiddle.net/7kYJu/2001/
Contributor guide
Assessment
This issue has not been assessed yet.