Skip to content

Commit 0183244

Browse files
authored
FIX: chart correctly shows series when toggled (#1567)
Repro steps: 1. Display two series 2. Toggle off one series (using run selector) 3. Create a new chart instance by say toggle log scale 4. Toggle on the series that got turned off 5. ?? where is the second series? This bug happened at least since 1.7 and is not a recent regression.
1 parent 05fb19d commit 0183244

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tensorboard/components/vz_line_chart2/vz-line-chart2.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ Polymer({
254254

255255
observers: [
256256
'_makeChart(xComponentsCreationMethod, xType, yValueAccessor, yScaleType, tooltipColumns, colorScale, isAttached)',
257-
'_reloadFromCache(_chart)',
257+
// Refer to the cache and, if available, load data of a new visible series.
258+
'_reloadFromCache(_chart, _visibleSeriesCache)',
258259
'_smoothingChanged(smoothingEnabled, smoothingWeight, _chart)',
259260
'_tooltipSortingMethodChanged(tooltipSortingMethod, _chart)',
260261
'_outliersChanged(ignoreYOutliers, _chart)',
@@ -318,10 +319,6 @@ Polymer({
318319
setVisibleSeries: function(names) {
319320
if (_.isEqual(this._visibleSeriesCache, names)) return;
320321
this._visibleSeriesCache = names;
321-
if (this._chart) {
322-
this._chart.setVisibleSeries(names);
323-
this.redraw();
324-
}
325322
},
326323

327324
/**

0 commit comments

Comments
 (0)