diff --git a/beakerx/beakerx/plot/chart.py b/beakerx/beakerx/plot/chart.py index 354a8d73cf..e5cf52ca69 100644 --- a/beakerx/beakerx/plot/chart.py +++ b/beakerx/beakerx/plot/chart.py @@ -442,8 +442,8 @@ def __init__(self, **kwargs): def add(self, item): super(NanoPlot, self).add(item) - converted = [] for l in self.chart.graphics_list: + converted = [] for x in l.x: converted.append(str(x)) l.x = converted diff --git a/js/notebook/src/plot/plotUtils.js b/js/notebook/src/plot/plotUtils.js index 28fac31448..cb63ad31e1 100644 --- a/js/notebook/src/plot/plotUtils.js +++ b/js/notebook/src/plot/plotUtils.js @@ -194,7 +194,7 @@ define([ datarange.xl = datarange.xr - 1; } else if (datarange.xr === -Infinity && datarange.xl !== Infinity) { datarange.xr = datarange.xl + 1; - } else if (visibleItem === 0 || datarange.xl === Infinity) { + } else if (visibleItem === 0 || visibleItem === 1 || datarange.xl === Infinity) { datarange.xl = 0; datarange.xr = 1; } else if (datarange.xl > datarange.xr) {