mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Ensure the bar chart widget updates its view when it refreshes
This commit is contained in:
parent
5445a8b782
commit
ea8556bb1f
8
plugins/tiddlywiki/d3/barwidget.js
vendored
8
plugins/tiddlywiki/d3/barwidget.js
vendored
@ -128,14 +128,18 @@ BarWidget.prototype.createChart = function() {
|
||||
.attr("transform", "translate(0," + height + ")")
|
||||
.call(xAxis);
|
||||
|
||||
var self = this;
|
||||
return function updateChart() {
|
||||
var self = this,
|
||||
updateChart = function() {
|
||||
if (self.grouped !== "no") {
|
||||
transitionGrouped();
|
||||
} else {
|
||||
transitionStacked();
|
||||
}
|
||||
};
|
||||
// Update the chart according to the grouped setting
|
||||
updateChart();
|
||||
// Return the update function
|
||||
return updateChart;
|
||||
|
||||
function transitionGrouped() {
|
||||
y.domain([0, yGroupMax]);
|
||||
|
Loading…
Reference in New Issue
Block a user