comparison client/src/components/gauge/Waterlevel.vue @ 4145:6095e95db454

optical adjustments to nowline and now line label
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 02 Aug 2019 11:11:32 +0200
parents 737e1199800f
children 40bd6854a294
comparison
equal deleted inserted replaced
4144:737e1199800f 4145:6095e95db454
706 .y(d => scale.y(d.y)); 706 .y(d => scale.y(d.y));
707 707
708 const nowLabel = selection => { 708 const nowLabel = selection => {
709 selection.attr( 709 selection.attr(
710 "transform", 710 "transform",
711 `translate(${scale.x(new Date())}, ${scale.y(hi + dy)})` 711 `translate(${scale.x(new Date())}, ${scale.y(hi + dy * 0.4)})`
712 ); 712 );
713 }; 713 };
714 714
715 // draw in main 715 // draw in main
716 diagram 716 diagram
717 .append("path") 717 .append("path")
718 .datum([{ x: new Date(), y: lo - dy }, { x: new Date(), y: hi + dy }]) 718 .datum([
719 { x: new Date(), y: lo - dy },
720 { x: new Date(), y: hi + dy * 0.4 }
721 ])
719 .attr("class", "now-line") 722 .attr("class", "now-line")
720 .attr("d", nowLine); 723 .attr("d", nowLine);
721 diagram // label 724 diagram // label
722 .append("text") 725 .append("text")
723 .text(this.$gettext("Now")) 726 .text(this.$gettext("Now"))