Skip to content

Commit

Permalink
Fix metrics and NLP options order
Browse files Browse the repository at this point in the history
  • Loading branch information
huyen-nguyen committed Aug 11, 2022
1 parent ff108b8 commit 679f8e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/wordstream.js
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,6 @@
legendFont = config.legendFont,
curve = config.curve;

console.log(globalWidth, globalHeight)
const color = d3.scaleOrdinal(d3.schemeCategory10);
const axisPadding = 10;
const legendOffset = 10;
Expand Down
14 changes: 13 additions & 1 deletion src/visualizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,19 @@ function panelForUpdate(){
d3.selectAll(("input[name='stack']")).on("change", function(){ // different NLP engine
categoryType = this.value
dataForVis = textProcessing(dataForNLP);
visualize(dataForVis);

let newData;
if (repType === 'frequency'){
newData = textProcessing(dataForNLP);
}
else if(repType === 'sudden'){
newData = getSuddenData(dataForVis)
}
else if (repType === 'tfidf'){
newData = getTFIDFData(dataForVis)
}

visualize(newData);
});

d3.select("#panel-3").style("display", "block")
Expand Down

0 comments on commit 679f8e7

Please sign in to comment.