pulse_meter-dygraphs_visualizer 0.4.22 → 0.4.23
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc32bbb3f4f40fbed4d12a5bccb6ea8c2909cdd4
|
4
|
+
data.tar.gz: 2a372fe402af0789c0f5db684aa06725340b4f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602bbd4effcf6c0af2bc28ad417b7e84663d1eb69c22a7ce5e13123703968ad1ac2b871e79fba32bf9f82ec9e7d824d7df458981761783e5ab72c9838626ee17
|
7
|
+
data.tar.gz: 9ad24988746c2fd8936b96a0ac2602d5bb90383622b166cb033634695314a405c43c9fbc5d283df6ac6d5b43f6af64d5e04313098091fe09957dba23b72f9fd9
|
data/examples/basic.ru
CHANGED
@@ -28,11 +28,6 @@ class WidgetPresenter
|
|
28
28
|
|
29
29
|
axisLabelWidth: 80
|
30
30
|
|
31
|
-
axes:
|
32
|
-
y:
|
33
|
-
valueFormatter: (x) -> x
|
34
|
-
axisLabelFormatter: (x) => @formatValueLabel(x)
|
35
|
-
|
36
31
|
}
|
37
32
|
|
38
33
|
mergedOptions: ->
|
@@ -50,22 +45,6 @@ class WidgetPresenter
|
|
50
45
|
|
51
46
|
data: -> new google.visualization.DataTable
|
52
47
|
|
53
|
-
formatValueLabel: (v) ->
|
54
|
-
sign = if v < 0 then "-" else ""
|
55
|
-
absv = Math.abs(v)
|
56
|
-
if absv >= 1000000000
|
57
|
-
v.toPrecision(4)
|
58
|
-
else
|
59
|
-
if absv >= 1000000
|
60
|
-
"#{sign}#{Math.floor(absv / 1000000)}kk"
|
61
|
-
else
|
62
|
-
if absv >= 1000
|
63
|
-
"#{sign}#{Math.floor(absv / 1000)}k"
|
64
|
-
else
|
65
|
-
v
|
66
|
-
|
67
|
-
|
68
|
-
|
69
48
|
draw: ->
|
70
49
|
@chart.draw @data(), @mergedOptions()
|
71
50
|
|
@@ -278,19 +278,7 @@ WidgetPresenter = (function() {
|
|
278
278
|
strokeBorderWidth: 1,
|
279
279
|
highlightCircleSize: 5
|
280
280
|
},
|
281
|
-
axisLabelWidth: 80
|
282
|
-
axes: {
|
283
|
-
y: {
|
284
|
-
valueFormatter: function(x) {
|
285
|
-
return x;
|
286
|
-
},
|
287
|
-
axisLabelFormatter: (function(_this) {
|
288
|
-
return function(x) {
|
289
|
-
return _this.formatValueLabel(x);
|
290
|
-
};
|
291
|
-
})(this)
|
292
|
-
}
|
293
|
-
}
|
281
|
+
axisLabelWidth: 80
|
294
282
|
};
|
295
283
|
};
|
296
284
|
|
@@ -304,25 +292,6 @@ WidgetPresenter = (function() {
|
|
304
292
|
return new google.visualization.DataTable;
|
305
293
|
};
|
306
294
|
|
307
|
-
WidgetPresenter.prototype.formatValueLabel = function(v) {
|
308
|
-
var absv, sign;
|
309
|
-
sign = v < 0 ? "-" : "";
|
310
|
-
absv = Math.abs(v);
|
311
|
-
if (absv >= 1000000000) {
|
312
|
-
return v.toPrecision(4);
|
313
|
-
} else {
|
314
|
-
if (absv >= 1000000) {
|
315
|
-
return "" + sign + (Math.floor(absv / 1000000)) + "kk";
|
316
|
-
} else {
|
317
|
-
if (absv >= 1000) {
|
318
|
-
return "" + sign + (Math.floor(absv / 1000)) + "k";
|
319
|
-
} else {
|
320
|
-
return v;
|
321
|
-
}
|
322
|
-
}
|
323
|
-
}
|
324
|
-
};
|
325
|
-
|
326
295
|
WidgetPresenter.prototype.draw = function() {
|
327
296
|
return this.chart.draw(this.data(), this.mergedOptions());
|
328
297
|
};
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
15
15
|
gem.name = "pulse_meter-dygraphs_visualizer"
|
16
16
|
gem.require_paths = ["lib"]
|
17
|
-
gem.version = "0.4.
|
17
|
+
gem.version = "0.4.23"
|
18
18
|
|
19
19
|
gem.add_runtime_dependency('pulse_meter_core')
|
20
20
|
gem.add_runtime_dependency('gon-sinatra')
|