2021-02-23 01:36:50 +00:00
|
|
|
<LineChart
|
|
|
|
@data={{@data}}
|
2021-03-16 02:47:12 +00:00
|
|
|
@dataProp={{@dataProp}}
|
2021-02-23 01:36:50 +00:00
|
|
|
@xProp="timestamp"
|
2021-03-16 02:47:12 +00:00
|
|
|
@yProp={{if @dataProp "percentStack" "percent"}}
|
2021-02-23 01:36:50 +00:00
|
|
|
@chartClass={{@chartClass}}
|
|
|
|
@timeseries={{true}}
|
|
|
|
@title="Stats Time Series Chart"
|
|
|
|
@description={{this.description}}
|
2021-03-16 02:47:12 +00:00
|
|
|
@xScale={{bind this.xScale this}}
|
|
|
|
@yScale={{bind this.yScale this}}
|
2021-02-23 01:36:50 +00:00
|
|
|
@xFormat={{this.xFormat}}
|
2021-02-24 07:22:20 +00:00
|
|
|
@yFormat={{this.yFormat}}>
|
|
|
|
<:svg as |c|>
|
2021-03-16 02:47:12 +00:00
|
|
|
{{#if this.useDefaults}}
|
|
|
|
<c.Area @data={{@data}} @colorClass={{@chartClass}} />
|
|
|
|
{{/if}}
|
2021-03-15 18:52:28 +00:00
|
|
|
{{yield c to="svg"}}
|
2021-02-24 07:22:20 +00:00
|
|
|
</:svg>
|
2021-03-09 05:01:57 +00:00
|
|
|
<:after as |c|>
|
2021-03-16 02:47:12 +00:00
|
|
|
{{#if this.useDefaults}}
|
|
|
|
<c.Tooltip class="is-snappy" as |series datum|>
|
|
|
|
<li>
|
|
|
|
<span class="label"><span class="color-swatch {{@chartClass}}" />{{datum.formattedX}}</span>
|
|
|
|
<span class="value">{{datum.formattedY}}</span>
|
|
|
|
</li>
|
|
|
|
</c.Tooltip>
|
|
|
|
{{/if}}
|
2021-03-15 18:52:28 +00:00
|
|
|
{{yield c to="after"}}
|
2021-03-09 05:01:57 +00:00
|
|
|
</:after>
|
2021-02-24 07:22:20 +00:00
|
|
|
</LineChart>
|