Skip to content

Commit

Permalink
Merge pull request maximilianh#204 from mxposed/async-violin-plot
Browse files Browse the repository at this point in the history
Draw violin plot asynchronously, speeds up expression display
  • Loading branch information
maximilianh committed Jan 4, 2021
2 parents 1f8b0f5 + 1beeec0 commit b336366
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/cbPyLib/cellbrowser/cbWeb/js/cellBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2717,10 +2717,13 @@ var cellbrowser = function() {
if (yLabel!==null)
optDict.scales = { yAxes: [{ scaleLabel: { display: true, labelString: yLabel} }] };

window.violinChart = new Chart(ctx, {
type: 'violin',
data: boxplotData,
options: optDict});
window.setTimeout(function() {
window.violinChart = new Chart(ctx, {
type: 'violin',
data: boxplotData,
options: optDict
});
}, 10);
console.timeEnd("violinDraw");
}

Expand Down

0 comments on commit b336366

Please sign in to comment.