open-nomad/ui/app/components/chart-primitives/tooltip.hbs
Michael Lange c066fdd80f Sort and index multi-series data correctly in line chart
- Sorting must be done on copies to preserve orders.
 - Indices should be reversed since rendering is also reversed (the back
   layer (the tallest) is rendered first to create the stacking effect).
2021-03-24 13:52:51 -07:00

8 lines
244 B
Handlebars

<div data-test-chart-tooltip class="chart-tooltip {{if @active "active" "inactive"}}" style={{@style}} ...attributes>
<ol>
{{#each @data as |props|}}
{{yield props.series props.datum (inc props.index)}}
{{/each}}
</ol>
</div>