Label the bandwidth line
Make it easier to understand what the graph is showing.
Showing
1 changed file
with
7 additions
and
1 deletions
... | @@ -292,7 +292,7 @@ | ... | @@ -292,7 +292,7 @@ |
292 | .attr('transform', 'translate(0,' + height + ')') | 292 | .attr('transform', 'translate(0,' + height + ')') |
293 | .call(timeAxis); | 293 | .call(timeAxis); |
294 | 294 | ||
295 | // bandwidth axis | 295 | // bitrate axis |
296 | svg.append('g') | 296 | svg.append('g') |
297 | .attr('class', 'y axis') | 297 | .attr('class', 'y axis') |
298 | .call(bitrateAxis) | 298 | .call(bitrateAxis) |
... | @@ -310,6 +310,12 @@ | ... | @@ -310,6 +310,12 @@ |
310 | .attr('class', 'line bandwidth') | 310 | .attr('class', 'line bandwidth') |
311 | .attr('d', bandwidthLine); | 311 | .attr('d', bandwidthLine); |
312 | 312 | ||
313 | svg.append('text') | ||
314 | .attr('transform', 'translate(' + x(x.range()[1]) + ', ' + y(data.bandwidth.slice(-1)[0].bandwidth) + ')') | ||
315 | .attr('x', 3) | ||
316 | .attr('dy', '1.35em') | ||
317 | .text('bandwidth') | ||
318 | |||
313 | // segment bitrate dots | 319 | // segment bitrate dots |
314 | svg.selectAll('.segment-bitrate').remove(); | 320 | svg.selectAll('.segment-bitrate').remove(); |
315 | svg.selectAll('.segment-bitrate') | 321 | svg.selectAll('.segment-bitrate') | ... | ... |
-
Please register or sign in to post a comment