I am trying to display a property from each looped through item but it only displays the last value of the item for all of the tooltips displayed.
I am trying to display each item's line name
lines =
export class Line {
linenumber: number = 0;
linename: string = '';
completionpercentages: Completion[] = [];
}
and I am trying to access the linename attribute
<kendo-chart-series-item
*ngFor="let item of this.ourdata.lines"
type="bar"
[data]="this.item.completionpercentages"
[name]="this.item.linename"
field="hours"
axis="laborhours"
>
<kendo-chart-tooltip>
<ng-template
kendoChartSeriesTooltipTemplate
let-value="value"
let-category="category"
let-dataItem="dataItem"
>
{{ intl.formatNumber(dataItem.completion, "##.0") }}% <br />{{
dataItem.historydate | date: "shortDate"
}}
<br />Line: {{ dataItem.linenumber }} - {{ this.item.linename}} ---
<br />Labor: {{ dataItem.hours }} Hours
</ng-template>
</kendo-chart-tooltip>
</kendo-chart-series-item>
In the tooltip the dataItem is the completion object which doesn't have the attribute linename.
For each of the tooltips it displays the last item's line name in each without displaying their own..
in this case line 7 should be "Bulk Areas"