open-vault/ui/app/templates/components/clients/vertical-bar-chart.hbs
claire bontempo 8ebdf1ee5a
UI/Client count running totals component (#14967)
* wire up running total component

* remove waitUntil

* remove unused functions

* abstract x/y keys

* adjust tick size

* refactor helpers into utils

* cleanup

* cleanup utils files and imports

* update variables to const

* mock empty monthly data
2022-04-12 13:30:40 -05:00

30 lines
862 B
Handlebars

<svg
data-test-vertical-bar-chart
class="chart has-grid"
{{on "mouseleave" this.removeTooltip}}
{{did-insert this.registerListener @dataset}}
{{did-update this.renderChart @dataset}}
>
</svg>
{{! TOOLTIP }}
{{#if this.tooltipTarget}}
{{! Required to set tag name = div https://github.com/yapplabs/ember-modal-dialog/issues/290 }}
{{! Component must be in curly bracket notation }}
{{! template-lint-disable no-curly-component-invocation }}
{{#modal-dialog
tagName="div"
tetherTarget=this.tooltipTarget
targetAttachment="bottom middle"
attachment="bottom middle"
offset="40px 0"
}}
<div class="chart-tooltip vertical-chart">
<p>{{this.tooltipTotal}}</p>
<p>{{this.entityClients}}</p>
<p>{{this.nonEntityClients}}</p>
</div>
<div class="chart-tooltip-arrow"></div>
{{/modal-dialog}}
{{/if}}