lib/rorschart/multiple_series.rb in rorschart-0.10.1 vs lib/rorschart/multiple_series.rb in rorschart-0.10.2
- old
+ new
@@ -10,25 +10,24 @@
}
end
def cols
cols_with_dup = @pivot_series.inject([]) { |cols, series|
- cols + series.cols
+ cols + (series.cols || [])
}
cols_with_dup.uniq
-
end
def rows
# create union of all series first columns, to represent all abscisse values available
union_x = union_of_first_columns()
# Preparation: store all series rows in a hash indexed by first column
series_indexed = []
@pivot_series.each { |serie|
- series_indexed << index_series_by_first_col(serie)
+ series_indexed << index_series_by_first_col(serie) if !serie.cols.nil?
}
# The Merge:
# For abscisse value, grab for each serie the corresponding row - or nil
union_series = []
@@ -66,6 +65,6 @@
serie_hash
end
end
-end
\ No newline at end of file
+end