Browse Source

Fix grid on flow

pull/282/head
Masayuki Tanaka 11 years ago
parent
commit
a2ab859330
  1. 6
      c3.js
  2. 2
      c3.min.js
  3. 8
      htdocs/samples/api_flow.html
  4. 10
      htdocs/samples/api_flow_timeseries.html

6
c3.js

@ -3962,6 +3962,7 @@
wait.add(mainLine.transition().attr('transform', transform)); wait.add(mainLine.transition().attr('transform', transform));
wait.add(mainArea.transition().attr('transform', transform)); wait.add(mainArea.transition().attr('transform', transform));
wait.add(mainCircle.transition().attr('transform', transform)); wait.add(mainCircle.transition().attr('transform', transform));
wait.add(xgrid.transition().attr('transform', transform));
}) })
.call(wait, function () { .call(wait, function () {
var i, targets = [], eventRects = []; var i, targets = [], eventRects = [];
@ -3973,8 +3974,11 @@
} }
svg.selectAll('.' + CLASS.shapes).selectAll(targets).remove(); svg.selectAll('.' + CLASS.shapes).selectAll(targets).remove();
svg.selectAll('.' + CLASS.eventRects).selectAll(eventRects).remove(); svg.selectAll('.' + CLASS.eventRects).selectAll(eventRects).remove();
svg.select('.' + CLASS.xgrid).remove();
// draw again for removing flowed elements // draw again for removing flowed elements and reverting attr
xgrid
.attr('transform', null);
mainBar mainBar
.attr('transform', null) .attr('transform', null)
.attr("d", drawBar); .attr("d", drawBar);

2
c3.min.js vendored

File diff suppressed because one or more lines are too long

8
htdocs/samples/api_flow.html

@ -37,6 +37,14 @@
max: 1000 max: 1000
*/ */
} }
},
grid: {
x: {
show: true
},
y: {
show: true
}
} }
}); });

10
htdocs/samples/api_flow_timeseries.html

@ -43,7 +43,17 @@
max: 1000 max: 1000
*/ */
} }
},
/* not supported yet
grid: {
x: {
show: true
},
y: {
show: true
}
} }
*/
}); });
setTimeout(function () { setTimeout(function () {

Loading…
Cancel
Save