Commit 1edb4dde authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix conflict

parents 4977298a 5c0c8ecc
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,9 +3,9 @@ c3_chart_fn.axis.labels = function (labels) { ...@@ -3,9 +3,9 @@ c3_chart_fn.axis.labels = function (labels) {
var $$ = this.internal; var $$ = this.internal;
if (arguments.length) { if (arguments.length) {
Object.keys(labels).forEach(function (axisId) { Object.keys(labels).forEach(function (axisId) {
$$._axis.setLabelText(axisId, labels[axisId]); $$.axis.setLabelText(axisId, labels[axisId]);
}); });
$$._axis.updateLabels(); $$.axis.updateLabels();
} }
// TODO: return some values? // TODO: return some values?
}; };
......
...@@ -48,7 +48,8 @@ function c3_axis(d3, params) { ...@@ -48,7 +48,8 @@ function c3_axis(d3, params) {
return newScale; return newScale;
} }
function textFormatted(v) { function textFormatted(v) {
return tickFormat ? tickFormat(v) : v; var formatted = tickFormat ? tickFormat(v) : v;
return typeof formatted !== 'undefined' ? formatted : '';
} }
function getSizeFor1Char(tick) { function getSizeFor1Char(tick) {
if (tickTextCharSize) { if (tickTextCharSize) {
......
var c3 = { version: "0.4.9" }; var c3 = { version: "0.4.9" };
var c3_chart_fn, c3_chart_internal_fn; var c3_chart_fn,
c3_chart_internal_fn,
c3_chart_internal_axis_fn;
function API(owner) { function API(owner) {
this.owner = owner; this.owner = owner;
...@@ -54,12 +56,15 @@ c3.generate = function (config) { ...@@ -54,12 +56,15 @@ c3.generate = function (config) {
c3.chart = { c3.chart = {
fn: Chart.prototype, fn: Chart.prototype,
internal: { internal: {
fn: ChartInternal.prototype fn: ChartInternal.prototype,
axis: {
fn: Axis.prototype
}
} }
}; };
c3_chart_fn = c3.chart.fn; c3_chart_fn = c3.chart.fn;
c3_chart_internal_fn = c3.chart.internal.fn; c3_chart_internal_fn = c3.chart.internal.fn;
c3_chart_internal_axis_fn = c3.chart.internal.axis.fn;
c3_chart_internal_fn.init = function () { c3_chart_internal_fn.init = function () {
var $$ = this, config = $$.config; var $$ = this, config = $$.config;
...@@ -168,7 +173,7 @@ c3_chart_internal_fn.initWithData = function (data) { ...@@ -168,7 +173,7 @@ c3_chart_internal_fn.initWithData = function (data) {
var $$ = this, d3 = $$.d3, config = $$.config; var $$ = this, d3 = $$.d3, config = $$.config;
var defs, main, binding = true; var defs, main, binding = true;
$$._axis = new _Axis($$); $$.axis = new Axis($$);
if ($$.initPie) { $$.initPie(); } if ($$.initPie) { $$.initPie(); }
if ($$.initBrush) { $$.initBrush(); } if ($$.initBrush) { $$.initBrush(); }
...@@ -287,7 +292,7 @@ c3_chart_internal_fn.initWithData = function (data) { ...@@ -287,7 +292,7 @@ c3_chart_internal_fn.initWithData = function (data) {
if (config.axis_x_extent) { $$.brush.extent($$.getDefaultExtent()); } if (config.axis_x_extent) { $$.brush.extent($$.getDefaultExtent()); }
// Add Axis // Add Axis
$$._axis.init(); $$.axis.init();
// Set targets // Set targets
$$.updateTargets($$.data.targets); $$.updateTargets($$.data.targets);
...@@ -477,7 +482,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) { ...@@ -477,7 +482,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
durationForExit = withTransitionForExit ? duration : 0; durationForExit = withTransitionForExit ? duration : 0;
durationForAxis = withTransitionForAxis ? duration : 0; durationForAxis = withTransitionForAxis ? duration : 0;
transitions = transitions || $$._axis.generateTransitions(durationForAxis); transitions = transitions || $$.axis.generateTransitions(durationForAxis);
// update legend and transform each g // update legend and transform each g
if (withLegend && config.legend_show) { if (withLegend && config.legend_show) {
...@@ -496,7 +501,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) { ...@@ -496,7 +501,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
if (targetsToShow.length) { if (targetsToShow.length) {
$$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain); $$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain);
if (!config.axis_x_tick_values) { if (!config.axis_x_tick_values) {
tickValues = $$._axis.updateXAxisTickValues(targetsToShow); tickValues = $$.axis.updateXAxisTickValues(targetsToShow);
} }
} else { } else {
$$.xAxis.tickValues([]); $$.xAxis.tickValues([]);
...@@ -511,17 +516,17 @@ c3_chart_internal_fn.redraw = function (options, transitions) { ...@@ -511,17 +516,17 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
$$.y2.domain($$.getYDomain(targetsToShow, 'y2', xDomainForZoom)); $$.y2.domain($$.getYDomain(targetsToShow, 'y2', xDomainForZoom));
if (!config.axis_y_tick_values && config.axis_y_tick_count) { if (!config.axis_y_tick_values && config.axis_y_tick_count) {
$$.yAxis.tickValues($$._axis.generateTickValues($$.y.domain(), config.axis_y_tick_count)); $$.yAxis.tickValues($$.axis.generateTickValues($$.y.domain(), config.axis_y_tick_count));
} }
if (!config.axis_y2_tick_values && config.axis_y2_tick_count) { if (!config.axis_y2_tick_values && config.axis_y2_tick_count) {
$$.y2Axis.tickValues($$._axis.generateTickValues($$.y2.domain(), config.axis_y2_tick_count)); $$.y2Axis.tickValues($$.axis.generateTickValues($$.y2.domain(), config.axis_y2_tick_count));
} }
// axes // axes
$$._axis.redraw(transitions, hideAxis); $$.axis.redraw(transitions, hideAxis);
// Update axis label // Update axis label
$$._axis.updateLabels(withTransition); $$.axis.updateLabels(withTransition);
// show/hide if manual culling needed // show/hide if manual culling needed
if ((withUpdateXDomain || withUpdateXAxis) && targetsToShow.length) { if ((withUpdateXDomain || withUpdateXAxis) && targetsToShow.length) {
...@@ -632,7 +637,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) { ...@@ -632,7 +637,7 @@ c3_chart_internal_fn.redraw = function (options, transitions) {
}); });
} }
if (duration) { if (duration && $$.isTabVisible()) { // Only use transition if tab visible. See #938.
// transition should be derived from one transition // transition should be derived from one transition
d3.transition().duration(duration).each(function () { d3.transition().duration(duration).each(function () {
var transitionsToWait = []; var transitionsToWait = [];
...@@ -702,7 +707,7 @@ c3_chart_internal_fn.updateAndRedraw = function (options) { ...@@ -702,7 +707,7 @@ c3_chart_internal_fn.updateAndRedraw = function (options) {
$$.updateSizes(); $$.updateSizes();
// MEMO: called in updateLegend in redraw if withLegend // MEMO: called in updateLegend in redraw if withLegend
if (!(options.withLegend && config.legend_show)) { if (!(options.withLegend && config.legend_show)) {
transitions = $$._axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0); transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0);
// Update scales // Update scales
$$.updateScales(); $$.updateScales();
$$.updateSvgSize(); $$.updateSvgSize();
...@@ -972,3 +977,18 @@ c3_chart_internal_fn.parseDate = function (date) { ...@@ -972,3 +977,18 @@ c3_chart_internal_fn.parseDate = function (date) {
} }
return parsedDate; return parsedDate;
}; };
c3_chart_internal_fn.isTabVisible = function () {
var hidden;
if (typeof document.hidden !== "undefined") { // Opera 12.10 and Firefox 18 and later support
hidden = "hidden";
} else if (typeof document.mozHidden !== "undefined") {
hidden = "mozHidden";
} else if (typeof document.msHidden !== "undefined") {
hidden = "msHidden";
} else if (typeof document.webkitHidden !== "undefined") {
hidden = "webkitHidden";
}
return document[hidden] ? false : true;
};
...@@ -20,7 +20,7 @@ c3_chart_internal_fn.getYDomainMin = function (targets) { ...@@ -20,7 +20,7 @@ c3_chart_internal_fn.getYDomainMin = function (targets) {
id = idsInGroup[k]; id = idsInGroup[k];
if (! ys[id]) { continue; } if (! ys[id]) { continue; }
ys[id].forEach(function (v, i) { ys[id].forEach(function (v, i) {
if ($$._axis.getId(id) === $$._axis.getId(baseId) && ys[baseId] && !(hasNegativeValue && +v > 0)) { if ($$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasNegativeValue && +v > 0)) {
ys[baseId][i] += +v; ys[baseId][i] += +v;
} }
}); });
...@@ -51,7 +51,7 @@ c3_chart_internal_fn.getYDomainMax = function (targets) { ...@@ -51,7 +51,7 @@ c3_chart_internal_fn.getYDomainMax = function (targets) {
id = idsInGroup[k]; id = idsInGroup[k];
if (! ys[id]) { continue; } if (! ys[id]) { continue; }
ys[id].forEach(function (v, i) { ys[id].forEach(function (v, i) {
if ($$._axis.getId(id) === $$._axis.getId(baseId) && ys[baseId] && !(hasPositiveValue && +v < 0)) { if ($$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasPositiveValue && +v < 0)) {
ys[baseId][i] += +v; ys[baseId][i] += +v;
} }
}); });
...@@ -62,7 +62,7 @@ c3_chart_internal_fn.getYDomainMax = function (targets) { ...@@ -62,7 +62,7 @@ c3_chart_internal_fn.getYDomainMax = function (targets) {
}; };
c3_chart_internal_fn.getYDomain = function (targets, axisId, xDomain) { c3_chart_internal_fn.getYDomain = function (targets, axisId, xDomain) {
var $$ = this, config = $$.config, var $$ = this, config = $$.config,
targetsByAxisId = targets.filter(function (t) { return $$._axis.getId(t.id) === axisId; }), targetsByAxisId = targets.filter(function (t) { return $$.axis.getId(t.id) === axisId; }),
yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId, yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId,
yMin = axisId === 'y2' ? config.axis_y2_min : config.axis_y_min, yMin = axisId === 'y2' ? config.axis_y2_min : config.axis_y_min,
yMax = axisId === 'y2' ? config.axis_y2_max : config.axis_y_max, yMax = axisId === 'y2' ? config.axis_y2_max : config.axis_y_max,
...@@ -123,16 +123,16 @@ c3_chart_internal_fn.getYDomain = function (targets, axisId, xDomain) { ...@@ -123,16 +123,16 @@ c3_chart_internal_fn.getYDomain = function (targets, axisId, xDomain) {
padding_bottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1])); padding_bottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1]));
} else if (showVerticalDataLabel) { } else if (showVerticalDataLabel) {
lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, 'height'); lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, 'height');
padding_top += this._axis.convertPixelsToAxisPadding(lengths[1], domainLength); padding_top += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength);
padding_bottom += this._axis.convertPixelsToAxisPadding(lengths[0], domainLength); padding_bottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength);
} }
if (axisId === 'y' && notEmpty(config.axis_y_padding)) { if (axisId === 'y' && notEmpty(config.axis_y_padding)) {
padding_top = $$._axis.getPadding(config.axis_y_padding, 'top', padding_top, domainLength); padding_top = $$.axis.getPadding(config.axis_y_padding, 'top', padding_top, domainLength);
padding_bottom = $$._axis.getPadding(config.axis_y_padding, 'bottom', padding_bottom, domainLength); padding_bottom = $$.axis.getPadding(config.axis_y_padding, 'bottom', padding_bottom, domainLength);
} }
if (axisId === 'y2' && notEmpty(config.axis_y2_padding)) { if (axisId === 'y2' && notEmpty(config.axis_y2_padding)) {
padding_top = $$._axis.getPadding(config.axis_y2_padding, 'top', padding_top, domainLength); padding_top = $$.axis.getPadding(config.axis_y2_padding, 'top', padding_top, domainLength);
padding_bottom = $$._axis.getPadding(config.axis_y2_padding, 'bottom', padding_bottom, domainLength); padding_bottom = $$.axis.getPadding(config.axis_y2_padding, 'bottom', padding_bottom, domainLength);
} }
// Bar/Area chart should be 0-based if all positive|negative // Bar/Area chart should be 0-based if all positive|negative
if (isZeroBased) { if (isZeroBased) {
......
...@@ -3,7 +3,7 @@ c3_chart_internal_fn.getYFormat = function (forArc) { ...@@ -3,7 +3,7 @@ c3_chart_internal_fn.getYFormat = function (forArc) {
formatForY = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.yFormat, formatForY = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.yFormat,
formatForY2 = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.y2Format; formatForY2 = forArc && !$$.hasType('gauge') ? $$.defaultArcValueFormat : $$.y2Format;
return function (v, ratio, id) { return function (v, ratio, id) {
var format = $$._axis.getId(id) === 'y2' ? formatForY2 : formatForY; var format = $$.axis.getId(id) === 'y2' ? formatForY2 : formatForY;
return format.call($$, v, ratio); return format.call($$, v, ratio);
}; };
}; };
......
...@@ -44,10 +44,10 @@ c3_chart_internal_fn.getY = function (min, max, domain) { ...@@ -44,10 +44,10 @@ c3_chart_internal_fn.getY = function (min, max, domain) {
return scale; return scale;
}; };
c3_chart_internal_fn.getYScale = function (id) { c3_chart_internal_fn.getYScale = function (id) {
return this._axis.getId(id) === 'y2' ? this.y2 : this.y; return this.axis.getId(id) === 'y2' ? this.y2 : this.y;
}; };
c3_chart_internal_fn.getSubYScale = function (id) { c3_chart_internal_fn.getSubYScale = function (id) {
return this._axis.getId(id) === 'y2' ? this.subY2 : this.subY; return this.axis.getId(id) === 'y2' ? this.subY2 : this.subY;
}; };
c3_chart_internal_fn.updateScales = function () { c3_chart_internal_fn.updateScales = function () {
var $$ = this, config = $$.config, var $$ = this, config = $$.config,
...@@ -69,15 +69,15 @@ c3_chart_internal_fn.updateScales = function () { ...@@ -69,15 +69,15 @@ c3_chart_internal_fn.updateScales = function () {
$$.subY = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y_default : $$.subY.domain()); $$.subY = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y_default : $$.subY.domain());
$$.subY2 = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y2_default : $$.subY2.domain()); $$.subY2 = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y2_default : $$.subY2.domain());
// update axes // update axes
$$.xAxisTickFormat = $$._axis.getXAxisTickFormat(); $$.xAxisTickFormat = $$.axis.getXAxisTickFormat();
$$.xAxisTickValues = $$._axis.getXAxisTickValues(); $$.xAxisTickValues = $$.axis.getXAxisTickValues();
$$.yAxisTickValues = $$._axis.getYAxisTickValues(); $$.yAxisTickValues = $$.axis.getYAxisTickValues();
$$.y2AxisTickValues = $$._axis.getY2AxisTickValues(); $$.y2AxisTickValues = $$.axis.getY2AxisTickValues();
$$.xAxis = $$._axis.getXAxis($$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer); $$.xAxis = $$.axis.getXAxis($$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer);
$$.subXAxis = $$._axis.getXAxis($$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer); $$.subXAxis = $$.axis.getXAxis($$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer);
$$.yAxis = $$._axis.getYAxis($$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer); $$.yAxis = $$.axis.getYAxis($$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer);
$$.y2Axis = $$._axis.getYAxis($$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer); $$.y2Axis = $$.axis.getYAxis($$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer);
// Set initialized scales to brush and zoom // Set initialized scales to brush and zoom
if (!forInit) { if (!forInit) {
......
...@@ -22,7 +22,7 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) { ...@@ -22,7 +22,7 @@ c3_chart_internal_fn.getCurrentPaddingLeft = function (withoutRecompute) {
} else if (config.axis_rotated) { } else if (config.axis_rotated) {
return !config.axis_x_show ? 1 : Math.max(ceil10($$.getAxisWidthByAxisId('x', withoutRecompute)), 40); return !config.axis_x_show ? 1 : Math.max(ceil10($$.getAxisWidthByAxisId('x', withoutRecompute)), 40);
} else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated } else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated
return $$._axis.getYAxisLabelPosition().isOuter ? 30 : 1; return $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1;
} else { } else {
return ceil10($$.getAxisWidthByAxisId('y', withoutRecompute)); return ceil10($$.getAxisWidthByAxisId('y', withoutRecompute));
} }
...@@ -35,7 +35,7 @@ c3_chart_internal_fn.getCurrentPaddingRight = function () { ...@@ -35,7 +35,7 @@ c3_chart_internal_fn.getCurrentPaddingRight = function () {
} else if (config.axis_rotated) { } else if (config.axis_rotated) {
return defaultPadding + legendWidthOnRight; return defaultPadding + legendWidthOnRight;
} else if (!config.axis_y2_show || config.axis_y2_inner) { // && !config.axis_rotated } else if (!config.axis_y2_show || config.axis_y2_inner) { // && !config.axis_rotated
return 2 + legendWidthOnRight + ($$._axis.getY2AxisLabelPosition().isOuter ? 20 : 0); return 2 + legendWidthOnRight + ($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0);
} else { } else {
return ceil10($$.getAxisWidthByAxisId('y2')) + legendWidthOnRight; return ceil10($$.getAxisWidthByAxisId('y2')) + legendWidthOnRight;
} }
...@@ -75,8 +75,8 @@ c3_chart_internal_fn.getSvgLeft = function (withoutRecompute) { ...@@ -75,8 +75,8 @@ c3_chart_internal_fn.getSvgLeft = function (withoutRecompute) {
c3_chart_internal_fn.getAxisWidthByAxisId = function (id, withoutRecompute) { c3_chart_internal_fn.getAxisWidthByAxisId = function (id, withoutRecompute) {
var $$ = this, position = $$._axis.getLabelPositionById(id); var $$ = this, position = $$.axis.getLabelPositionById(id);
return $$._axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40); return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40);
}; };
c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) { c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) {
var $$ = this, config = $$.config, h = 30; var $$ = this, config = $$.config, h = 30;
...@@ -86,9 +86,9 @@ c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) { ...@@ -86,9 +86,9 @@ c3_chart_internal_fn.getHorizontalAxisHeight = function (axisId) {
if (axisId === 'y2' && !config.axis_y2_show) { return $$.rotated_padding_top; } if (axisId === 'y2' && !config.axis_y2_show) { return $$.rotated_padding_top; }
// Calculate x axis height when tick rotated // Calculate x axis height when tick rotated
if (axisId === 'x' && !config.axis_rotated && config.axis_x_tick_rotate) { if (axisId === 'x' && !config.axis_rotated && config.axis_x_tick_rotate) {
h = $$._axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180); h = $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180);
} }
return h + ($$._axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === 'y2' ? -10 : 0); return h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === 'y2' ? -10 : 0);
}; };
c3_chart_internal_fn.getEventRectWidth = function () { c3_chart_internal_fn.getEventRectWidth = function () {
......
...@@ -18,7 +18,7 @@ c3_chart_internal_fn.initTooltip = function () { ...@@ -18,7 +18,7 @@ c3_chart_internal_fn.initTooltip = function () {
} }
$$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) { $$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) {
return $$.addName(d.values[config.tooltip_init_x]); return $$.addName(d.values[config.tooltip_init_x]);
}), $$._axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType()), $$.color)); }), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType()), $$.color));
$$.tooltip.style("top", config.tooltip_init_position.top) $$.tooltip.style("top", config.tooltip_init_position.top)
.style("left", config.tooltip_init_position.left) .style("left", config.tooltip_init_position.left)
.style("display", "block"); .style("display", "block");
...@@ -95,7 +95,7 @@ c3_chart_internal_fn.showTooltip = function (selectedData, element) { ...@@ -95,7 +95,7 @@ c3_chart_internal_fn.showTooltip = function (selectedData, element) {
if (dataToShow.length === 0 || !config.tooltip_show) { if (dataToShow.length === 0 || !config.tooltip_show) {
return; return;
} }
$$.tooltip.html(config.tooltip_contents.call($$, selectedData, $$._axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color)).style("display", "block"); $$.tooltip.html(config.tooltip_contents.call($$, selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color)).style("display", "block");
// Get tooltip dimensions // Get tooltip dimensions
tWidth = $$.tooltip.property('offsetWidth'); tWidth = $$.tooltip.property('offsetWidth');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment