lib/chartd/chart.rb in chartd-1.0.0 vs lib/chartd/chart.rb in chartd-1.0.1

- old
+ new

@@ -13,14 +13,14 @@ # allow min and max to be changed after instantiating a Chart attr_accessor :min, :max def initialize(dataset = [], min: nil, max: nil, ylabels: true, options: {}) raise ERR_BAD_DATASET unless dataset.is_a?(Array) - raise ERR_TOO_MANY_DATASETS if dataset.count > 5 # Check if dataset is multidimensional and if so, use it as is. # Otherwise make it multidimensional. if dataset[0].is_a?(Array) + raise ERR_TOO_MANY_DATASETS if dataset.count > 5 @dataset = dataset else @dataset = [dataset] end