Tooltip template as ContentChild on BaseChart
See original GitHub issueI’d like to be able to customize the tooltip for any chart that extends BaseChart.
I’ll make a PR if you like the idea.
Something like this:
<some-chart>
<template #tooltipTemplate let-model>
{{model.customValue}} and {{some.outside.value}}
</template>
</some-chart>
BaseChart would register @ContentChild('tooltipTemplate') tooltipTemplate: TemplateRef
And each chart would be responsible for plugging this.tooltipTemplate
into the swui-template
directive.
Note: I haven’t thought of a good way to override the area-tooltips. I won’t touch them in this PR.
Let me know what you think.
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
JavaScript @angular/core ContentChild Examples
JavaScript ContentChild - 30 examples found. These are the top rated real world JavaScript examples of @angular/core.ContentChild extracted from open source ...
Read more >devextreme-angular - UNPKG
base/chart -annotation-config-dxi';\r\n\r\n\r\n@Component({\r\n selector: 'dxi-annotation',\r\n template: '',\r\n styles: [''],\r\n providers: ...
Read more >pie-chart.component.ts - Veebiraamistik - e-riigi koodivaramu
ContentChild,. 5. EventEmitter, ... common/base-chart/base-chart.component.scss', '. ... tooltipTemplate: TemplateRef<any>;.
Read more >Mobile Application Framework Tag Library - Oracle Help Center
<adfmf:amx>, A Feature Content child, defining AMX based content (local AMX view or ... <dvtm:xFormat>, Specifies the x value format used in the...
Read more >AxisRenderer - ApacheFlex API Reference
AxisRenderer objects inherit some of their visual properties from the enclosing chart object. The text format of the labels and title defaults to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This was implemented in https://github.com/swimlane/ngx-charts/pull/399.
If both are defined, what if we ignore the
ContentChild
, since it comes later in the life cycle but also send aconsole.warn
to the developer.