charty 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e39148cc6e6fd7916cdfbe5dacda3bab8f95068cbe3ceb4dff673d9688487d0
4
- data.tar.gz: 5743d17f30055707fe39004f99bb30fb2cb10b164dbf9b222f000068cc800708
3
+ metadata.gz: 0c245a8324486b73226c85162c602997c5b8e4f41c6fc03d731cd7c8c0e0c763
4
+ data.tar.gz: 720f08fdcf14ac5da11eace6f684d002c694de1d1b062fa9b954da4a286ae810
5
5
  SHA512:
6
- metadata.gz: 562b312fb4ca59995d19930f404d6162f432f7731752e5a9016132b6b2696a507f6d7523d5eb6e5bc0141273726d2608b1351b497f2c200cec0fda5204e4fc19
7
- data.tar.gz: 213f83930bc1bd809ae98af41d0608793c356b234064e9f2ec79b96e76b1c301a331fc44c9c04fc0f3f188f65b780b59af449dca206f68ec310cb121b6bd0e41
6
+ metadata.gz: 253bf7b26d3ee72fe604afb4cdf50de412aa956171dc6671c33a158e2252597f71005fbbccb0f879f11688327339bf569f653f15eef6ac30faa4c0173765d607
7
+ data.tar.gz: b3cbfbd190a145c41db3d3fec8050f9ec4b9ddc12d978fb2c96a3a825409b708c8c0d6f14456ed0bf17f2c8150999ec063a1898d97b37c3e984a88645adc0d4b
@@ -49,6 +49,7 @@ module Charty
49
49
  </script>
50
50
  END_SCRIPT
51
51
  end
52
+ IRuby.display(script, mime: "text/html")
52
53
  end
53
54
 
54
55
  def render(figure, element_id: nil, post_script: nil)
@@ -106,7 +106,7 @@ module Charty
106
106
  }.each do |key, val|
107
107
  next if val.nil?
108
108
 
109
- if data.column_names.include?(val)
109
+ if data.column?(val)
110
110
  plot_data[key] = data[val]
111
111
  variables[key] = val
112
112
  else
@@ -134,7 +134,11 @@ module Charty
134
134
  each_subset([:color], processed: true) do |sub_vars, sub_data|
135
135
  key = sub_vars.to_a
136
136
  observations = sub_data[data_variable].drop_na.to_a
137
- hist = Statistics.histogram(observations)
137
+ hist = if bins != :auto
138
+ Statistics.histogram(observations, bins)
139
+ else
140
+ Statistics.histogram(observations)
141
+ end
138
142
  histograms[key] = hist
139
143
  end
140
144
 
@@ -1,5 +1,5 @@
1
1
  module Charty
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
 
4
4
  module Version
5
5
  numbers, TAG = VERSION.split("-")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: charty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - youchan
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-06-21 00:00:00.000000000 Z
13
+ date: 2021-06-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: red-colors