plasticine 1.2.4 → 1.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 622f4435b4c85728ba586bd87bb722c134c440d5afe78d628860745ccad9d8dd
4
- data.tar.gz: 73e6646931aabe61bf7bd2f7c6ea0a5d759b5d50a7ec987976fcc1dc31a2c4bc
3
+ metadata.gz: 9bb5f86e12c2a4107a172e7a9da8e9099d661830cd84aae1fb1d4d852e355bd5
4
+ data.tar.gz: a3ad1f9ab14a002ad81191b791ae8b26b7a692972a5b83130a37aafbf4c22fa2
5
5
  SHA512:
6
- metadata.gz: 2b7672a93c63e6342253f9d4f6ae7837c95b42e4783367470aed43c4195588fb19348a89333e6cb18823f7d8480515a20d565f597b3a98e38a1c423199f771c0
7
- data.tar.gz: 83a0d23568412d127554b0b74e395d3ae56b80ddbacdc299df78e039411c4aded93035f4e1159fc24ef702cc18cad0fa4868fb6281ec55165646c90a982c0f5a
6
+ metadata.gz: 96a611d38d22ae9fbc30e8993137305865f58a7eb9252cc6b50e1b8f99efdefd85c08af997fee6321a2ea0024b23a370a27e803e777659a99db82e0f7a8a2887
7
+ data.tar.gz: 9698839e958d7bad1e857413cc85e13f1fa42536aaabd97abf7c175e94ae54345e2dad905030a738afee9424f3a9366e575d84f3dcef304c3d3f1ddfd4de30fd
@@ -1,7 +1,5 @@
1
1
  class @PlasticineColumn
2
2
  constructor: (@holder) ->
3
- @holder = $('.plasticine-column')
4
-
5
3
  PlasticineHelpers.setLocale()
6
4
  @drawTooltip()
7
5
 
@@ -70,7 +68,7 @@ class @PlasticineColumn
70
68
  refreshColumns: () ->
71
69
  self = this
72
70
 
73
- $('g.column').remove()
71
+ @holder.find('g.column').remove()
74
72
 
75
73
  @columns.enter().append("g").attr('class', 'column')
76
74
  .attr('data-x-val', (d) -> d.x_value)
@@ -147,7 +145,7 @@ class @PlasticineColumn
147
145
 
148
146
  tooltipX = xPosition - (tooltip.outerWidth() / 2) + (parseInt(barNode.attr("width")) / 2)
149
147
 
150
- d3.select(".tooltip")
151
- .style("left", tooltipX + "px")
152
- .style("top", (yPosition - tooltip.outerHeight()) + "px")
148
+ tooltip
149
+ .css("left", tooltipX + "px")
150
+ .css("top", (yPosition - tooltip.outerHeight()) + "px")
153
151
 
@@ -36,7 +36,7 @@ PlasticineHelpers.formatNumericString = (str) ->
36
36
  PlasticineHelpers.setAxisFormat = (axis, format) ->
37
37
  switch format
38
38
  when 'date' then axis.tickFormat(d3.timeFormat('%b'))
39
- when 'day' then axis.tickFormat(d3.timeFormat('%e-%m'))
39
+ when 'day' then axis.tickFormat(d3.timeFormat('%d-%m'))
40
40
  when 'daytext' then axis.tickFormat(d3.timeFormat('%e %b'))
41
41
  when 'hours' then axis.tickFormat (d) => @toHours(d)
42
42
  when 'money' then axis.tickFormat (d) => @toPrice(d)
@@ -93,5 +93,3 @@ PlasticineHelpers.toYear = (strDate, quarterStartMonth) ->
93
93
  year += 1
94
94
 
95
95
  year
96
-
97
-
@@ -1,8 +1,5 @@
1
1
  class @PlasticineLine
2
2
  constructor: (@holder) ->
3
- @holder = $('.plasticine-line')
4
- @holder.on('resize', (e) => @resizeX())
5
-
6
3
  PlasticineHelpers.setLocale()
7
4
 
8
5
  @xScale = d3.scaleBand()
@@ -66,13 +63,14 @@ class @PlasticineLine
66
63
 
67
64
  @drawXAxis()
68
65
  @drawLegend(data)
66
+
69
67
  d3.select(window).on("resize." + @holder.attr("id"), () => @resizeX())
70
68
 
71
69
 
72
70
  refreshLines: () ->
73
71
  self = this
74
72
 
75
- $('g.element').remove()
73
+ @holder.find('g.element').remove()
76
74
 
77
75
  element = @lines.enter().append('g').attr('class', "element")
78
76
  element.append("path")
@@ -3,7 +3,7 @@ Gem::Specification.new do |gem|
3
3
  gem.description = "Data visualization toolkit for Rails App using D3.js"
4
4
  gem.summary = "Data visualization toolkit for Rails App using D3.js"
5
5
  gem.homepage = "https://github.com/alchimikweb/plasticine"
6
- gem.version = "1.2.4"
6
+ gem.version = "1.2.5"
7
7
  gem.licenses = ["MIT"]
8
8
 
9
9
  gem.authors = ["Sebastien Rosa"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plasticine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Rosa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-17 00:00:00.000000000 Z
11
+ date: 2019-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails