MCPcopy Create free account
hub / github.com/microsoft/SandDance / BarChartRecommender1

Function BarChartRecommender1

docs/app/js/sanddance-app.js:12311–12324  ·  view source on GitHub ↗
(column1, data)

Source from the content-addressed store, hash-verified

12309exports.BarChartRecommenderSummary = BarChartRecommenderSummary;
12310var BarChartRecommender = /** @class */ function() {
12311 function BarChartRecommender1(column1, data) {
12312 this.score = 0;
12313 this.column = column1;
12314 //the total score for bar chart is 1
12315 this.rules = [
12316 function(column) {
12317 if (column.stats.isSequential) return false;
12318 else if (column.quantitative) return true;
12319 else if (!column.quantitative && column.stats.distinctValueCount <= maxDistinctVal && column.stats.distinctValueCount >= minDistinctVal) return true;
12320 else return false;
12321 }
12322 ];
12323 for(var i = 0; i < this.rules.length; i++)if (this.rules[i](column1)) this.score++;
12324 }
12325 BarChartRecommender1.prototype.recommend = function() {
12326 var rec = {
12327 chart: "barchart",

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected