github.com/hernad/nomad@v1.6.112/ui/app/templates/components/stats-time-series.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <LineChart 7 @data={{@data}} 8 @dataProp={{@dataProp}} 9 @xProp="timestamp" 10 @yProp={{if @dataProp "percentStack" "percent"}} 11 @chartClass={{@chartClass}} 12 @timeseries={{true}} 13 @title="Stats Time Series Chart" 14 @description={{this.description}} 15 @xScale={{bind this.xScale this}} 16 @yScale={{bind this.yScale this}} 17 @xFormat={{this.xFormat}} 18 @yFormat={{this.yFormat}}> 19 <:svg as |c|> 20 {{#if this.useDefaults}} 21 <c.Area @data={{@data}} @colorClass={{@chartClass}} /> 22 {{/if}} 23 {{yield c to="svg"}} 24 </:svg> 25 <:after as |c|> 26 {{#if this.useDefaults}} 27 <c.Tooltip class="is-snappy" as |series datum|> 28 <li> 29 <span class="label"><span class="color-swatch {{@chartClass}}" />{{datum.formattedX}}</span> 30 <span class="value">{{datum.formattedY}}</span> 31 </li> 32 </c.Tooltip> 33 {{/if}} 34 {{yield c to="after"}} 35 </:after> 36 </LineChart>