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 | 99 | .duration(200) |
100 | 100 | .style("opacity", 1); |
101 | 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 | 103 | .style("left", (e.pageX - tooltip_offset.dx) + "px") |
104 | 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 | 120 | .duration(200) |
121 | 121 | .style("opacity", 1) |
122 | 122 | tooltip |
123 | - .html("<b>" + d.period + ": </b>" + d.total + "%") | |
123 | + .html("<b>" + d.period + ": </b>" + d.total + " ETP") | |
124 | 124 | .style("left", (e.pageX - tooltip_offset_dot.dx) + "px") |
125 | 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 | 308 | if (categories_total_charge.hasOwnProperty(k)) { |
309 | 309 | categories_total_charge[k] += +d[k] |
310 | 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 | 384 | .attr("transform", "rotate(-90)") |
385 | 385 | .attr("y", -margin.left + 40) |
386 | 386 | .attr("x", -margin.top - 70) |
387 | - .text("Charge (% ETP)"); | |
387 | + .text("Charge en ETP"); | |
388 | 388 | |
389 | 389 | // |
390 | 390 | // Write chart Title | ... | ... |