thecore_ui_commons 3.2.7 → 3.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/echarts/multiple_vectors.rb +12 -3
- data/lib/echarts/vector.rb +1 -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: 9a89f857f2cf388f09bf05ca847fae601011f21e260589ff73ae40936367ab45
|
4
|
+
data.tar.gz: 36097df9d2f5f0a439b038b5d6b646fa42807574baf1c00cb4eca4a34ce335fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85111e3931683d801814410c6b229242a38c954183939849b2235e0874d48f4541cb6d11868798bd45eef6276b401e08255a1c1593a639beaa878ed696164515
|
7
|
+
data.tar.gz: 6a405ce358889a913b41abacd849363215e4dcc3b0c707cf4644025379494c09611011d32b12e83e57b2865f17931811232821550552b6208d34ea878bc3c77b
|
@@ -1,8 +1,13 @@
|
|
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,
|
@@ -29,8 +34,12 @@ module Echarts
|
|
29
34
|
trigger: "axis",
|
30
35
|
},
|
31
36
|
xAxis: {
|
32
|
-
type: "
|
37
|
+
type: "value",
|
33
38
|
name: xLabel,
|
39
|
+
boundaryGap: false,
|
40
|
+
data: x_values,
|
41
|
+
min: x_values.first.floor,
|
42
|
+
max: x_values.last.ceil,
|
34
43
|
},
|
35
44
|
yAxis: {
|
36
45
|
type: "value",
|
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,
|
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.9
|
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-
|
11
|
+
date: 2024-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|