fix series-segments for empty series

This commit is contained in:
Daniel Schwabeneder 2021-03-06 12:03:50 +01:00
parent f097549e3b
commit d44b7e89e7

View File

@ -77,7 +77,7 @@ end
function series_segments(series::Series, seriestype::Symbol = :path) function series_segments(series::Series, seriestype::Symbol = :path)
x, y, z = series[:x], series[:y], series[:z] x, y, z = series[:x], series[:y], series[:z]
x === nothing && return UnitRange{Int}[] (x === nothing || isempty(x)) && return UnitRange{Int}[]
args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y) args = RecipesPipeline.is3d(series) ? (x, y, z) : (x, y)
nan_segments = collect(iter_segments(args...)) nan_segments = collect(iter_segments(args...))