Skip to content

Commit b5a094a

Browse files
committed
fix chart setdata
1 parent e5e086a commit b5a094a

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

js/module/tracer/chart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ class ChartTracer extends Tracer {
2020
}
2121

2222
setData(C) {
23-
if (super.setData.apply(this, arguments)) return true;
23+
if (super.setData.apply(this, arguments)) {
24+
this.chart.config.data.datasets[0].data = C;
25+
this.chart.update();
26+
return true;
27+
}
2428

2529
var color = [];
2630
for (var i = 0; i < C.length; i++) color.push(this.color.default);

public/algorithm_visualizer.js

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/algorithm_visualizer.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)