|
|
|
@ -72,10 +72,12 @@ c3_chart_internal_fn.initParams = function () {
|
|
|
|
|
$$.clipIdForXAxis = $$.clipId + '-xaxis', |
|
|
|
|
$$.clipIdForYAxis = $$.clipId + '-yaxis', |
|
|
|
|
$$.clipIdForGrid = $$.clipId + '-grid', |
|
|
|
|
$$.clipIdForSubchart = $$.clipId + '-subchart', |
|
|
|
|
$$.clipPath = $$.getClipPath($$.clipId), |
|
|
|
|
$$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis), |
|
|
|
|
$$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis); |
|
|
|
|
$$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid), |
|
|
|
|
$$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart), |
|
|
|
|
|
|
|
|
|
$$.dragStart = null; |
|
|
|
|
$$.dragging = false; |
|
|
|
@ -201,6 +203,7 @@ c3_chart_internal_fn.initWithData = function (data) {
|
|
|
|
|
$$.clipXAxis = $$.appendClip(defs, $$.clipIdForXAxis); |
|
|
|
|
$$.clipYAxis = $$.appendClip(defs, $$.clipIdForYAxis); |
|
|
|
|
$$.clipGrid = $$.appendClip(defs, $$.clipIdForGrid); |
|
|
|
|
$$.clipSubchart = $$.appendClip(defs, $$.clipIdForSubchart); |
|
|
|
|
$$.updateSvgSize(); |
|
|
|
|
|
|
|
|
|
// Define regions
|
|
|
|
@ -746,7 +749,8 @@ c3_chart_internal_fn.transformAll = function (withTransition, transitions) {
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
c3_chart_internal_fn.updateSvgSize = function () { |
|
|
|
|
var $$ = this; |
|
|
|
|
var $$ = this, |
|
|
|
|
brush = $$.svg.select(".c3-brush .background"); |
|
|
|
|
$$.svg.attr('width', $$.currentWidth).attr('height', $$.currentHeight); |
|
|
|
|
$$.svg.selectAll(['#' + $$.clipId, '#' + $$.clipIdForGrid]).select('rect') |
|
|
|
|
.attr('width', $$.width) |
|
|
|
@ -761,6 +765,9 @@ c3_chart_internal_fn.updateSvgSize = function () {
|
|
|
|
|
.attr('y', $$.getYAxisClipY.bind($$)) |
|
|
|
|
.attr('width', $$.getYAxisClipWidth.bind($$)) |
|
|
|
|
.attr('height', $$.getYAxisClipHeight.bind($$)); |
|
|
|
|
$$.svg.select('#' + $$.clipIdForSubchart).select('rect') |
|
|
|
|
.attr('width', $$.width) |
|
|
|
|
.attr('height', brush.size() ? brush.attr('height') : 0); |
|
|
|
|
$$.svg.select('.' + CLASS.zoomRect) |
|
|
|
|
.attr('width', $$.width) |
|
|
|
|
.attr('height', $$.height); |
|
|
|
|