open-nomad/ui/app/templates/components/line-chart.hbs

29 lines
1.1 KiB
Handlebars
Raw Normal View History

<svg data-test-line-chart>
2018-09-07 16:59:02 +00:00
<defs>
<linearGradient x1="0" x2="0" y1="0" y2="1" class="{{chartClass}}" id="{{fillId}}">
<stop class="start" offset="0%" />
<stop class="end" offset="100%" />
</linearGradient>
<clipPath id="{{maskId}}">
<path class="fill" d="{{area}}" />
2018-09-07 16:59:02 +00:00
</clipPath>
</defs>
<g class="y-gridlines gridlines" transform="translate({{yAxisOffset}}, 0)"></g>
<g class="canvas {{chartClass}}">
<path class="line" d="{{line}}" />
<rect class="area" x="0" y="0" width="{{yAxisOffset}}" height="{{xAxisOffset}}" fill="url(#{{fillId}})" clip-path="url(#{{maskId}})" />
2018-09-07 16:59:02 +00:00
<rect class="hover-target" x="0" y="0" width="{{yAxisOffset}}" height="{{xAxisOffset}}" />
</g>
<g class="x-axis axis" transform="translate(0, {{xAxisOffset}})"></g>
<g class="y-axis axis" transform="translate({{yAxisOffset}}, 0)"></g>
</svg>
<div class="chart-tooltip is-snappy {{if isActive "active" "inactive"}}" style={{tooltipStyle}}>
<p>
<span class="label">
<span class="color-swatch {{chartClass}}" />
{{activeDatumLabel}}
</span>
<span class="value">{{activeDatumValue}}</span>
</p>
2018-09-07 16:59:02 +00:00
</div>