|
|
|
@ -232,7 +232,7 @@ nv.models.historicalBarChart = function() {
|
|
|
|
|
// Event Handling/Dispatching (in chart's scope)
|
|
|
|
|
//------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
legend.dispatch.on('legendClick', function(d,i) {
|
|
|
|
|
legend.dispatch.on('legendClick', function(d,i) {
|
|
|
|
|
d.disabled = !d.disabled;
|
|
|
|
|
|
|
|
|
|
if (!data.filter(function(d) { return !d.disabled }).length) {
|
|
|
|
@ -254,7 +254,7 @@ nv.models.historicalBarChart = function() {
|
|
|
|
|
data.forEach(function(d) {
|
|
|
|
|
d.disabled = true;
|
|
|
|
|
});
|
|
|
|
|
d.disabled = false;
|
|
|
|
|
d.disabled = false;
|
|
|
|
|
|
|
|
|
|
state.disabled = data.map(function(d) { return !!d.disabled });
|
|
|
|
|
dispatch.stateChange(state);
|
|
|
|
@ -276,7 +276,7 @@ nv.models.historicalBarChart = function() {
|
|
|
|
|
state.disabled = e.disabled;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
selection.call(chart);
|
|
|
|
|
chart.update();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//============================================================
|
|
|
|
@ -318,11 +318,11 @@ nv.models.historicalBarChart = function() {
|
|
|
|
|
chart.xAxis = xAxis;
|
|
|
|
|
chart.yAxis = yAxis;
|
|
|
|
|
|
|
|
|
|
d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale',
|
|
|
|
|
d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale',
|
|
|
|
|
'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate','highlightPoint','clearHighlights', 'interactive');
|
|
|
|
|
|
|
|
|
|
chart.options = nv.utils.optionsFunc.bind(chart);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chart.margin = function(_) {
|
|
|
|
|
if (!arguments.length) return margin;
|
|
|
|
|
margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
|
|
|
|
|