visual changes in module creation

This commit is contained in:
alejandro-campos 2020-02-07 13:59:50 +01:00
parent b658fddfc2
commit bc96e0b32a
1 changed files with 21 additions and 19 deletions

View File

@ -1523,6 +1523,8 @@ function paint_graph_status(
width_x = 101; width_x = 101;
height_x = 50; height_x = 50;
legend_width_x = 190;
legend_height_x = 80;
svg svg
.append("g") .append("g")
@ -1535,8 +1537,8 @@ function paint_graph_status(
.attr("width", 300) .attr("width", 300)
.attr("height", 300) .attr("height", 300)
.append("text") .append("text")
.attr("x", width_x) .attr("x", legend_width_x + 15)
.attr("y", height_x - 20) .attr("y", legend_height_x - 20)
.attr("fill", "black") .attr("fill", "black")
.style("font-family", "arial") .style("font-family", "arial")
.style("font-weight", "bold") .style("font-weight", "bold")
@ -1551,8 +1553,8 @@ function paint_graph_status(
.append("g") .append("g")
.append("rect") .append("rect")
.attr("id", "legend_normal") .attr("id", "legend_normal")
.attr("x", width_x + 80) .attr("x", legend_width_x)
.attr("y", height_x - 30) .attr("y", legend_height_x - 30)
.attr("width", 10) .attr("width", 10)
.attr("height", 10) .attr("height", 10)
.style("fill", "#82B92E"); .style("fill", "#82B92E");
@ -1561,8 +1563,8 @@ function paint_graph_status(
svg svg
.append("g") .append("g")
.append("text") .append("text")
.attr("x", width_x + 100) .attr("x", legend_width_x + 15)
.attr("y", height_x - 20) .attr("y", legend_height_x + 5)
.attr("fill", "black") .attr("fill", "black")
.style("font-family", "arial") .style("font-family", "arial")
.style("font-weight", "bold") .style("font-weight", "bold")
@ -1575,8 +1577,8 @@ function paint_graph_status(
.append("g") .append("g")
.append("rect") .append("rect")
.attr("id", "legend_warning") .attr("id", "legend_warning")
.attr("x", width_x + 185) .attr("x", legend_width_x)
.attr("y", height_x - 30) .attr("y", legend_height_x - 5)
.attr("width", 10) .attr("width", 10)
.attr("height", 10) .attr("height", 10)
.style("fill", "#ffd731"); .style("fill", "#ffd731");
@ -1585,8 +1587,8 @@ function paint_graph_status(
svg svg
.append("g") .append("g")
.append("text") .append("text")
.attr("x", width_x + 205) .attr("x", legend_width_x + 15)
.attr("y", height_x - 20) .attr("y", legend_height_x + 30)
.attr("fill", "black") .attr("fill", "black")
.style("font-family", "arial") .style("font-family", "arial")
.style("font-weight", "bold") .style("font-weight", "bold")
@ -1599,8 +1601,8 @@ function paint_graph_status(
.append("g") .append("g")
.append("rect") .append("rect")
.attr("id", "legend_critical") .attr("id", "legend_critical")
.attr("x", width_x + 285) .attr("x", legend_width_x)
.attr("y", height_x - 30) .attr("y", legend_height_x + 20)
.attr("width", 10) .attr("width", 10)
.attr("height", 10) .attr("height", 10)
.style("fill", "#e63c52"); .style("fill", "#e63c52");
@ -1624,7 +1626,7 @@ function paint_graph_status(
.attr("id", "status_rect") .attr("id", "status_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x) .attr("y", height_x)
.attr("width", 300) .attr("width", 75)
.attr("height", 200) .attr("height", 200)
.style("fill", "#82B92E"); .style("fill", "#82B92E");
@ -1641,7 +1643,7 @@ function paint_graph_status(
"y", "y",
height_x + (range_max - min_w) * position - (max_w - min_w) * position height_x + (range_max - min_w) * position - (max_w - min_w) * position
) )
.attr("width", 300) .attr("width", 75)
.attr("height", (max_w - min_w) * position) .attr("height", (max_w - min_w) * position)
.style("fill", "#ffd731"); .style("fill", "#ffd731");
} else { } else {
@ -1653,7 +1655,7 @@ function paint_graph_status(
.attr("id", "warning_rect") .attr("id", "warning_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x + 200 - (min_w - range_min) * position) .attr("y", height_x + 200 - (min_w - range_min) * position)
.attr("width", 300) .attr("width", 75)
.attr("height", (min_w - range_min) * position) .attr("height", (min_w - range_min) * position)
.style("fill", "#ffd731"); .style("fill", "#ffd731");
@ -1665,7 +1667,7 @@ function paint_graph_status(
.attr("id", "warning_inverse_rect") .attr("id", "warning_inverse_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x) .attr("y", height_x)
.attr("width", 300) .attr("width", 75)
.attr( .attr(
"height", "height",
(range_max - min_w) * position - (max_w - min_w) * position (range_max - min_w) * position - (max_w - min_w) * position
@ -1685,7 +1687,7 @@ function paint_graph_status(
"y", "y",
height_x + (range_max - min_c) * position - (max_c - min_c) * position height_x + (range_max - min_c) * position - (max_c - min_c) * position
) )
.attr("width", 300) .attr("width", 75)
.attr("height", (max_c - min_c) * position) .attr("height", (max_c - min_c) * position)
.style("fill", "#e63c52"); .style("fill", "#e63c52");
} else { } else {
@ -1697,7 +1699,7 @@ function paint_graph_status(
.attr("id", "critical_rect") .attr("id", "critical_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x + 200 - (min_c - range_min) * position) .attr("y", height_x + 200 - (min_c - range_min) * position)
.attr("width", 300) .attr("width", 75)
.attr("height", (min_c - range_min) * position) .attr("height", (min_c - range_min) * position)
.style("fill", "#e63c52"); .style("fill", "#e63c52");
svg svg
@ -1708,7 +1710,7 @@ function paint_graph_status(
.attr("id", "critical_inverse_rect") .attr("id", "critical_inverse_rect")
.attr("x", width_x) .attr("x", width_x)
.attr("y", height_x) .attr("y", height_x)
.attr("width", 300) .attr("width", 75)
.attr( .attr(
"height", "height",
(range_max - min_c) * position - (max_c - min_c) * position (range_max - min_c) * position - (max_c - min_c) * position