Commit e66e53667ed5d4676d6378bda1c15fb7ebab2d2b

Authored by hitier
1 parent 0a7a5369

Tiny comments

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/main/static/js/charges.js
... ... @@ -88,8 +88,6 @@ function build_chart(div_selector, data_url, project_name, category) {
88 88 .enter().append('text')
89 89 .attr("transform", (d, i) => "translate(30, " + (i * legend_cell_size + legend_cell_size / 1.6) + ")")
90 90 .attr('class', 'legend')
91   - // .style("font-size", "10px")
92   - // .style("font-weight", "bold")
93 91 .style("fill", "black")
94 92 .text(d => d);
95 93 }
... ... @@ -200,12 +198,14 @@ function build_chart(div_selector, data_url, project_name, category) {
200 198  
201 199 // Draw the stacked bars
202 200 //
  201 + // first one group for one category containing all bars over periods
203 202 let groups = svg.selectAll("g.category")
204 203 .data(stacked_data)
205 204 .enter()
206 205 .append("g")
207 206 .style("fill", (d) => color_scale(d.key));
208 207  
  208 + // then each period/category bar
209 209 let rect = groups.selectAll("rect")
210 210 .data(d => d)
211 211 .enter()
... ...