We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4fd1606 + d5df084 commit c76b7b2Copy full SHA for c76b7b2
.gitignore
@@ -8,4 +8,5 @@
8
/html/
9
/spec/reports/
10
/tmp/
11
-/.idea/
+/.idea/
12
+*.gem
lib/gnuplotrb/staff/dataset.rb
@@ -249,7 +249,9 @@ def init_dblock(data, options)
249
# Create new value for 'using' option based on column count
250
def get_daru_columns(data, cnt)
251
new_opt = (2..cnt).to_a.join(':')
252
- if data.index.key(0).is_a?(DateTime) || data.index.key(0).is_a?(Numeric)
+ # check if DateTimeIndex. If not, assume it is Daru::Index and check for
253
+ # numeric value in the index.
254
+ if data.index.instance_of?(Daru::DateTimeIndex) || data.index.first[0].is_a?(Numeric)
255
"1:#{new_opt}"
256
else
257
"#{new_opt}:xtic(1)"
0 commit comments