option to pass title on dataLabelFormating not just the value number also the title
Iyal-Khanjar opened this issue · comments
Is your feature request related to a problem? Please describe.
on data label formatting i want to show also the title name not just the value i know it is in the x label but i want it also on the data label where the value's is or if there is a way to know which the title of the bar the value on
Describe the solution you'd like
something like this to add a title
<ngx-charts-bar-vertical [maxXAxisTickLength]=50 [yAxisTickFormatting]="yAxisTickFormattingFn" [xAxisTickFormatting]="xAxisTickFormattingFn" [dataLabelFormatting]="dataLabelFormattingFn" [showDataLabel]="true" [results]="performance" [scheme]="colorScheme" [legend]="false" [showXAxisLabel]="true" [showYAxisLabel]="true" [xAxis]="true" [yAxis]="true" [gradient]="false" > <ng-template #tooltipTemplate let-model="model" > {{ tooltip(model) }} </ng-template> </ngx-charts-bar-vertical>
where dataLabelFormatting is
private dataLabelFormatting(value: number, title: string) { return title + value + "%"; }
Describe alternatives you've considered
nothing
Additional context
I have this code
and dataLabelFormattingFn is
how can i know the value at which bar title is it
Any one Have a solution?