thecore_ui_commons 3.2.8 → 3.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/echarts/binary.rb +3 -0
- data/lib/echarts/binary_series.rb +3 -0
- data/lib/echarts/multiple_vectors.rb +14 -7
- data/lib/echarts/speedometer.rb +3 -0
- data/lib/echarts/vector.rb +4 -0
- data/lib/thecore_ui_commons/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e8b4606a09d6cda969cfa55b49bac79ab911d9e4adb0b8bda1af95dc12f9a1a
|
4
|
+
data.tar.gz: aeb0495a3ebb0d4b66855f0106d6dce62b69297069e344b5c6876d20c1027014
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eaf5bbcf1d7a280fa944003596cbe1db68b914bb1273d4f06baa0f51a620e34c88f0619488d00b8960dfd8356cec9aeac85bc4f8e26eca7930725677d341d482
|
7
|
+
data.tar.gz: 0fd493dd96c00e0be53a25ead5e38d893592ed4f8014517cdf8328cd1d80bb7448a821643afdf1adac287de283d9a652dd03f4cdffff1d73e7b705386e13acc5
|
data/lib/echarts/binary.rb
CHANGED
@@ -1,14 +1,19 @@
|
|
1
1
|
module Echarts
|
2
2
|
module MultipleVectors
|
3
3
|
def self.get_config(stacks, legend, min, max, lower_bound, upper_bound, title, subtitle, xLabel, yLabel, color_min = "limegreen", color_max = "tomato")
|
4
|
-
Rails.logger.debug("Legend: #{legend}\nLegend size: #{legend.size}")
|
5
|
-
Rails.logger.debug("Stacks size: #{stacks.size}")
|
4
|
+
# Rails.logger.debug("Legend: #{legend}\nLegend size: #{legend.size}")
|
5
|
+
# Rails.logger.debug("Stacks size: #{stacks.size}")
|
6
|
+
# get first value of each stack present in the stacks array and use it as the x axis
|
7
|
+
# Stacks is in the form [[[x1, y1], [x2, y2], [x3, y3], ...], [[x1, y1], [x2, y2], [x3, y3], ...], ...]
|
8
|
+
# data must be [x1, x2, x3, ...]
|
9
|
+
x_values = stacks.map { |stack| stack.map(&:first) }.flatten.uniq.sort
|
10
|
+
# Rails.logger.debug("X Values: #{x_values}")
|
6
11
|
{
|
7
12
|
grid: {
|
8
13
|
top: 80,
|
9
14
|
},
|
10
15
|
legend: {
|
11
|
-
|
16
|
+
bottom: 2,
|
12
17
|
show: true,
|
13
18
|
data: legend,
|
14
19
|
type: "scroll",
|
@@ -18,6 +23,9 @@ module Echarts
|
|
18
23
|
subtext: subtitle,
|
19
24
|
},
|
20
25
|
toolbox: {
|
26
|
+
top: 'middle',
|
27
|
+
right: 5,
|
28
|
+
orient: "vertical",
|
21
29
|
feature: {
|
22
30
|
saveAsImage: {},
|
23
31
|
dataView: {},
|
@@ -32,10 +40,9 @@ module Echarts
|
|
32
40
|
type: "value",
|
33
41
|
name: xLabel,
|
34
42
|
boundaryGap: false,
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
data: stacks.map { |stack| stack.map(&:first) }.flatten.uniq.sort,
|
43
|
+
data: x_values,
|
44
|
+
min: x_values.first.floor,
|
45
|
+
max: x_values.last.ceil,
|
39
46
|
},
|
40
47
|
yAxis: {
|
41
48
|
type: "value",
|
data/lib/echarts/speedometer.rb
CHANGED
data/lib/echarts/vector.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
module Echarts
|
2
2
|
module Vector
|
3
3
|
def self.get_config(x, value, min, max, lower_bound, upper_bound, title, subtitle, xLabel, yLabel, color_min = "limegreen", color_max = "tomato", color_generic = "dodgerblue")
|
4
|
+
# Rails.logger.debug("X: #{x.inspect}")
|
4
5
|
{
|
5
6
|
grid: {
|
6
7
|
top: 80,
|
@@ -10,6 +11,9 @@ module Echarts
|
|
10
11
|
subtext: subtitle,
|
11
12
|
},
|
12
13
|
toolbox: {
|
14
|
+
top: 'middle',
|
15
|
+
right: 5,
|
16
|
+
orient: "vertical",
|
13
17
|
feature: {
|
14
18
|
saveAsImage: {},
|
15
19
|
dataView: {},
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_ui_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10-
|
11
|
+
date: 2024-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|