Commit 582e1ee2060da7865bbfd58e3a6f9abbb466113e
1 parent
0a8a3ec6
Exists in
master
and in
4 other branches
Change charts legends for ETP display
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
app/main/static/js/charges.js
@@ -99,7 +99,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | @@ -99,7 +99,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | ||
99 | .duration(200) | 99 | .duration(200) |
100 | .style("opacity", 1); | 100 | .style("opacity", 1); |
101 | tooltip | 101 | tooltip |
102 | - .html("<b>" + category_title + ":</b> " + category_name + "<br>" + "<b>Charge:</b> " + category_charge + "%") | 102 | + .html("<b>" + category_title + ":</b> " + category_name + "<br>" + "<b>Charge:</b> " + category_charge + " ETP") |
103 | .style("left", (e.pageX - tooltip_offset.dx) + "px") | 103 | .style("left", (e.pageX - tooltip_offset.dx) + "px") |
104 | .style("top", (e.pageY - tooltip_offset.dy) + "px") | 104 | .style("top", (e.pageY - tooltip_offset.dy) + "px") |
105 | } | 105 | } |
@@ -120,7 +120,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | @@ -120,7 +120,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | ||
120 | .duration(200) | 120 | .duration(200) |
121 | .style("opacity", 1) | 121 | .style("opacity", 1) |
122 | tooltip | 122 | tooltip |
123 | - .html("<b>" + d.period + ": </b>" + d.total + "%") | 123 | + .html("<b>" + d.period + ": </b>" + d.total + " ETP") |
124 | .style("left", (e.pageX - tooltip_offset_dot.dx) + "px") | 124 | .style("left", (e.pageX - tooltip_offset_dot.dx) + "px") |
125 | .style("top", (e.pageY - tooltip_offset_dot.dy) + "px") | 125 | .style("top", (e.pageY - tooltip_offset_dot.dy) + "px") |
126 | } | 126 | } |
@@ -308,7 +308,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | @@ -308,7 +308,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | ||
308 | if (categories_total_charge.hasOwnProperty(k)) { | 308 | if (categories_total_charge.hasOwnProperty(k)) { |
309 | categories_total_charge[k] += +d[k] | 309 | categories_total_charge[k] += +d[k] |
310 | } else { | 310 | } else { |
311 | - categories_total_charge[k] = d[k] | 311 | + categories_total_charge[k] = +d[k] |
312 | } | 312 | } |
313 | } | 313 | } |
314 | ) | 314 | ) |
@@ -384,7 +384,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | @@ -384,7 +384,7 @@ function build_chart(div_selector, data_url, entity_name, category_type) { | ||
384 | .attr("transform", "rotate(-90)") | 384 | .attr("transform", "rotate(-90)") |
385 | .attr("y", -margin.left + 40) | 385 | .attr("y", -margin.left + 40) |
386 | .attr("x", -margin.top - 70) | 386 | .attr("x", -margin.top - 70) |
387 | - .text("Charge (% ETP)"); | 387 | + .text("Charge en ETP"); |
388 | 388 | ||
389 | // | 389 | // |
390 | // Write chart Title | 390 | // Write chart Title |