Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
changeCount: function () {
var select = this.el.querySelector('[data-hook~="count"]');
this.model.count = parseFloat(select.value);
this.updateShading();
this.plotShading();
if(this.model.mode == 'fit') return;
this.updateSelection();
dc.redrawAll(); // will result in a callback to this.redraw()
},
LighthouseStatsJobsCleanup.prepareData(jobs, unit, start, end, function(cleanJobs) {
prepareCharts(cleanJobs, start, end, firstrun);
LighthouseWordCloud.makeSituationOnSceneCloud(cleanJobs, '#cloud');
if (firstrunlocal) {
console.log("First Run - We Will Render All")
dc.renderAll();
} else {
console.log("NOT first run - Will Redraw All")
dc.redrawAll();
$('#loadinginline').css('visibility', 'hidden');
}
//WE ARE DONE WILL ALL LOADING
if (firstrunlocal) {
firstrun = false
}
//click to reset the filters that are applied
$(".total").click(function($e) {
$e.preventDefault();
dc.filterAll();
dc.renderAll();
});
resetFacebookChart = (event) => {
event.preventDefault();
this.state.charts.facebookShareChart.filterAll();
dc.redrawAll();
}
$("#reset-volume-chart").click(function () {
volumeChart.filterAll();
dc.redrawAll();
return false;
});
resetSourcesFilters() {
this.refs.sourcePieChart.clearFilters();
this.nameDimension.filterAll();
this.loadHistogramData();
this._toggleResetButtons();
dc.redrawAll();
},
resetHistogramFilters() {
refreshChartData = function() {
var frontEndData = healthfrontend.find( {} ).fetch();
var ndx = crossfilter( frontEndData );
if ( frontEndData.length === 0 && ndx.size() > 0 ) {
debugLog( 'clearing ndx/dc.js' );
dc.filterAll();
ndx.remove();
dc.redrawAll();
} else {
ndx = crossfilter( frontEndData );
}
if ( ndx.size() > 0 ) {
var hostDim = ndx.dimension( function( d ) { return d.hostname; } );
var hostEPS = hostDim.group().reduceSum( function( d ) { return d.details.total_deliver_eps.toFixed( 2 ); } );
var hostLoadAverage = hostDim.group().reduceSum( function( d ) { return d.details.loadaverage[0]; } );
var epsTotal = ndx.groupAll().reduceSum( function( d ) { return d.details.total_deliver_eps; } );
totalEPS
.valueAccessor( function( d ) { return d; } )
.group( epsTotal );
ringChartEPS
.width( 150 ).height( 150 )
.dimension( hostDim )
resetSourcesFilters() {
this.sourcePieChart.clearFilters();
this.nameDimension.filterAll();
this.loadHistogramData();
this._toggleResetButtons();
dc.redrawAll();
},