Commit 715c39f1 authored by michalkop93's avatar michalkop93

Merge branch 'master' of https://github.com/masayuki0812/c3 into axisTickGenerator

Conflicts: c3.min.js
parents b1e09815 bfffa3c4
...@@ -2271,7 +2271,7 @@ ...@@ -2271,7 +2271,7 @@
// Call event handler // Call event handler
$$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) { $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
config.data_onmouseover.call($$, d); config.data_onmouseover.call($$.api, d);
}); });
}) })
.on('mouseout', function (d) { .on('mouseout', function (d) {
...@@ -2284,7 +2284,7 @@ ...@@ -2284,7 +2284,7 @@
$$.unexpandBars(); $$.unexpandBars();
// Call event handler // Call event handler
$$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) { $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
config.data_onmouseout.call($$, d); config.data_onmouseout.call($$.api, d);
}); });
}) })
.on('mousemove', function (d) { .on('mousemove', function (d) {
...@@ -2399,7 +2399,7 @@ ...@@ -2399,7 +2399,7 @@
closest = $$.findClosestFromTargets(targetsToShow, mouse); closest = $$.findClosestFromTargets(targetsToShow, mouse);
if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) { if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) {
config.data_onmouseout.call($$, $$.mouseover); config.data_onmouseout.call($$.api, $$.mouseover);
$$.mouseover = undefined; $$.mouseover = undefined;
} }
...@@ -2433,7 +2433,7 @@ ...@@ -2433,7 +2433,7 @@
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < 100) { if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < 100) {
$$.svg.select('.' + CLASS.eventRect).style('cursor', 'pointer'); $$.svg.select('.' + CLASS.eventRect).style('cursor', 'pointer');
if (!$$.mouseover) { if (!$$.mouseover) {
config.data_onmouseover.call($$, closest); config.data_onmouseover.call($$.api, closest);
$$.mouseover = closest; $$.mouseover = closest;
} }
} }
...@@ -4353,6 +4353,7 @@ ...@@ -4353,6 +4353,7 @@
// rotate tick text if needed // rotate tick text if needed
if (!config.axis_rotated && config.axis_x_tick_rotate) { if (!config.axis_rotated && config.axis_x_tick_rotate) {
$$.rotateTickText($$.axes.x, transitions.axisX, config.axis_x_tick_rotate); $$.rotateTickText($$.axes.x, transitions.axisX, config.axis_x_tick_rotate);
$$.rotateTickText($$.axes.subx, transitions.axisSubX, config.axis_x_tick_rotate);
} }
}; };
...@@ -4949,7 +4950,7 @@ ...@@ -4949,7 +4950,7 @@
.attr('class', CLASS.dragarea) .attr('class', CLASS.dragarea)
.style('opacity', 0.1); .style('opacity', 0.1);
$$.dragging = true; $$.dragging = true;
$$.config.data_ondragstart(); $$.config.data_ondragstart.call($$.api);
}; };
c3_chart_internal_fn.dragend = function () { c3_chart_internal_fn.dragend = function () {
...@@ -4963,7 +4964,7 @@ ...@@ -4963,7 +4964,7 @@
$$.main.selectAll('.' + CLASS.shape) $$.main.selectAll('.' + CLASS.shape)
.classed(CLASS.INCLUDED, false); .classed(CLASS.INCLUDED, false);
$$.dragging = false; $$.dragging = false;
$$.config.data_ondragend(); $$.config.data_ondragend.call($$.api);
}; };
...@@ -5144,11 +5145,6 @@ ...@@ -5144,11 +5145,6 @@
// update subchart elements if needed // update subchart elements if needed
if (withSubchart) { if (withSubchart) {
// rotate tick text if needed
if (!config.axis_rotated && config.axis_x_tick_rotate) {
$$.rotateTickText($$.axes.subx, transitions.axisSubX, config.axis_x_tick_rotate);
}
// extent rect // extent rect
if (!$$.brush.empty()) { if (!$$.brush.empty()) {
$$.brush.extent($$.x.orgDomain()).update(); $$.brush.extent($$.x.orgDomain()).update();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -368,5 +368,6 @@ c3_chart_internal_fn.redrawAxis = function (transitions, isHidden) { ...@@ -368,5 +368,6 @@ c3_chart_internal_fn.redrawAxis = function (transitions, isHidden) {
// rotate tick text if needed // rotate tick text if needed
if (!config.axis_rotated && config.axis_x_tick_rotate) { if (!config.axis_rotated && config.axis_x_tick_rotate) {
$$.rotateTickText($$.axes.x, transitions.axisX, config.axis_x_tick_rotate); $$.rotateTickText($$.axes.x, transitions.axisX, config.axis_x_tick_rotate);
$$.rotateTickText($$.axes.subx, transitions.axisSubX, config.axis_x_tick_rotate);
} }
}; };
...@@ -65,7 +65,7 @@ c3_chart_internal_fn.dragstart = function (mouse) { ...@@ -65,7 +65,7 @@ c3_chart_internal_fn.dragstart = function (mouse) {
.attr('class', CLASS.dragarea) .attr('class', CLASS.dragarea)
.style('opacity', 0.1); .style('opacity', 0.1);
$$.dragging = true; $$.dragging = true;
$$.config.data_ondragstart(); $$.config.data_ondragstart.call($$.api);
}; };
c3_chart_internal_fn.dragend = function () { c3_chart_internal_fn.dragend = function () {
...@@ -79,6 +79,6 @@ c3_chart_internal_fn.dragend = function () { ...@@ -79,6 +79,6 @@ c3_chart_internal_fn.dragend = function () {
$$.main.selectAll('.' + CLASS.shape) $$.main.selectAll('.' + CLASS.shape)
.classed(CLASS.INCLUDED, false); .classed(CLASS.INCLUDED, false);
$$.dragging = false; $$.dragging = false;
$$.config.data_ondragend(); $$.config.data_ondragend.call($$.api);
}; };
...@@ -142,7 +142,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) { ...@@ -142,7 +142,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
// Call event handler // Call event handler
$$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) { $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
config.data_onmouseover.call($$, d); config.data_onmouseover.call($$.api, d);
}); });
}) })
.on('mouseout', function (d) { .on('mouseout', function (d) {
...@@ -155,7 +155,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) { ...@@ -155,7 +155,7 @@ c3_chart_internal_fn.generateEventRectsForSingleX = function (eventRectEnter) {
$$.unexpandBars(); $$.unexpandBars();
// Call event handler // Call event handler
$$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) { $$.main.selectAll('.' + CLASS.shape + '-' + index).each(function (d) {
config.data_onmouseout.call($$, d); config.data_onmouseout.call($$.api, d);
}); });
}) })
.on('mousemove', function (d) { .on('mousemove', function (d) {
...@@ -270,7 +270,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) ...@@ -270,7 +270,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
closest = $$.findClosestFromTargets(targetsToShow, mouse); closest = $$.findClosestFromTargets(targetsToShow, mouse);
if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) { if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) {
config.data_onmouseout.call($$, $$.mouseover); config.data_onmouseout.call($$.api, $$.mouseover);
$$.mouseover = undefined; $$.mouseover = undefined;
} }
...@@ -304,7 +304,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter) ...@@ -304,7 +304,7 @@ c3_chart_internal_fn.generateEventRectsForMultipleXs = function (eventRectEnter)
if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < 100) { if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < 100) {
$$.svg.select('.' + CLASS.eventRect).style('cursor', 'pointer'); $$.svg.select('.' + CLASS.eventRect).style('cursor', 'pointer');
if (!$$.mouseover) { if (!$$.mouseover) {
config.data_onmouseover.call($$, closest); config.data_onmouseover.call($$.api, closest);
$$.mouseover = closest; $$.mouseover = closest;
} }
} }
......
...@@ -99,11 +99,6 @@ c3_chart_internal_fn.redrawSubchart = function (withSubchart, transitions, durat ...@@ -99,11 +99,6 @@ c3_chart_internal_fn.redrawSubchart = function (withSubchart, transitions, durat
// update subchart elements if needed // update subchart elements if needed
if (withSubchart) { if (withSubchart) {
// rotate tick text if needed
if (!config.axis_rotated && config.axis_x_tick_rotate) {
$$.rotateTickText($$.axes.subx, transitions.axisSubX, config.axis_x_tick_rotate);
}
// extent rect // extent rect
if (!$$.brush.empty()) { if (!$$.brush.empty()) {
$$.brush.extent($$.x.orgDomain()).update(); $$.brush.extent($$.x.orgDomain()).update();
......
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