lib/rorschart/multiple_series.rb in rorschart-0.10.2 vs lib/rorschart/multiple_series.rb in rorschart-0.10.3

- old
+ new

@@ -10,24 +10,25 @@ } 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) if !serie.cols.nil? + series_indexed << index_series_by_first_col(serie) } # The Merge: # For abscisse value, grab for each serie the corresponding row - or nil union_series = [] @@ -65,6 +66,6 @@ serie_hash end end -end +end \ No newline at end of file