No longer include an automatic tooltip in LineChart
It is now required to use the one yielded by the :after named block.
This commit is contained in:
parent
15b68cc00c
commit
f1633e2be0
|
@ -293,7 +293,7 @@ export default class LineChart extends Component {
|
|||
return {
|
||||
series,
|
||||
datum: {
|
||||
formattedX: this.xFormat()(datum[xProp]),
|
||||
formattedX: this.xFormat(this.args.timeseries)(datum[xProp]),
|
||||
formattedY: this.yFormat()(datum[yProp]),
|
||||
datum,
|
||||
},
|
||||
|
|
|
@ -51,17 +51,4 @@
|
|||
data=this.activeData)
|
||||
) to="after"}}
|
||||
{{/if}}
|
||||
{{#unless @dataProp}}
|
||||
<div class="chart-tooltip is-snappy {{if this.isActive "active" "inactive"}}" style={{this.tooltipStyle}}>
|
||||
<ol>
|
||||
<li>
|
||||
<span class="label">
|
||||
<span class="color-swatch {{this.chartClass}}" />
|
||||
{{this.activeDatumLabel}}
|
||||
</span>
|
||||
<span class="value">{{this.activeDatumValue}}</span>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
@data={{this.data}} />
|
||||
</:svg>
|
||||
<:after as |c|>
|
||||
<c.Tooltip class="is-snappy" as |series datum|>
|
||||
<li>
|
||||
<span class="label"><span class="color-swatch is-primary" />{{datum.formattedX}}</span>
|
||||
<span class="value">{{datum.formattedY}}</span>
|
||||
</li>
|
||||
</c.Tooltip>
|
||||
<c.VAnnotations
|
||||
@annotations={{this.annotations}}
|
||||
@key="event.uid"
|
||||
|
|
|
@ -13,4 +13,12 @@
|
|||
<:svg as |c|>
|
||||
<c.Area @data={{@data}} @colorClass={{@chartClass}} />
|
||||
</:svg>
|
||||
<:after as |c|>
|
||||
<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>
|
||||
</:after>
|
||||
</LineChart>
|
||||
|
|
Loading…
Reference in New Issue