From d7e4d25fb4b26c4afd6c3fbcc40d157d2236be0c Mon Sep 17 00:00:00 2001 From: tomfacal <88186642+tomfacal@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:06:00 +0100 Subject: [PATCH 1/4] updated tooltip example --- .../configuration/00-overviewchart.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md index a6912c9c6..948fe24fc 100644 --- a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md +++ b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md @@ -127,4 +127,36 @@ export class CandlestickComponent { this.candlestick.setDataArray(DataAdapterUtils.adapter.adaptResult(data)); } } +``` +## Custom Tooltip Example + +Tooltips in charts provide valuable contextual information. This section explains how to customize tooltips for a *Line Chart* by modifying the date format, content, and style. + +### Customizing Tooltip Content + +You can define custom tooltip templates to format the displayed data. + +*HTML* + +```html + + + Date: {{model?.name | date:'dd/MM/yyyy'}}
+ Value: {{model?.value | currency:'EUR'}} +
+ + Series Tooltip: {{model?.name}} - {{model?.value}} + +
+``` + +### Adding Interactivity + +You can capture tooltip-related events and customize behavior. + +```ts +activate(event: any) { + console.log("Tooltip activated:", event); +} ``` \ No newline at end of file From 91a2cd6dcf7b2fa16a4e46558513d24c657751ad Mon Sep 17 00:00:00 2001 From: tomfacal <88186642+tomfacal@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:13:26 +0100 Subject: [PATCH 2/4] updated versions --- .../configuration/00-overviewchart.md | 2 ++ docs/aditional-information/52-versions.md | 17 ++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md index 948fe24fc..19fd76341 100644 --- a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md +++ b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md @@ -155,6 +155,8 @@ You can define custom tooltip templates to format the displayed data. You can capture tooltip-related events and customize behavior. +*TS* + ```ts activate(event: any) { console.log("Tooltip activated:", event); diff --git a/docs/aditional-information/52-versions.md b/docs/aditional-information/52-versions.md index f66d239f1..053944220 100644 --- a/docs/aditional-information/52-versions.md +++ b/docs/aditional-information/52-versions.md @@ -29,13 +29,16 @@ In this section you can check the different releases of **OntimizeWeb** and its + 15.5.1 + 15.0.0 + 15.0.1
15.0.0 + 15.1.4
15.1.3
15.1.2
15.1.1
15.1.0
15.0.1
15.0.0 + 15.1.2
15.1.1
15.1.0
15.0.0 + 15.0.3
15.0.2
15.0.1
15.0.0 + 15.1.0
15.0.0 + + 15.5.0 - 15.0.0 - 15.0.1
15.0.0 - 15.1.3
15.1.2
15.1.1
15.1.0
15.0.1
15.0.0 - 15.1.2
15.1.1
15.1.0
15.0.0 - 15.0.3
15.0.2
15.0.1
15.0.0 - 15.1.0
15.0.0 15.4.4 @@ -45,7 +48,6 @@ In this section you can check the different releases of **OntimizeWeb** and its 15.4.2 - 15.4.1 @@ -110,6 +112,7 @@ In this section you can check the different releases of **OntimizeWeb** and its + - The prefix _ontimize-web-ngx_ was omitted from the names of the addons. {: .note } From 8aea8b90ae8050cfe6efc89e3322e25b849171fc Mon Sep 17 00:00:00 2001 From: tomfacal <88186642+tomfacal@users.noreply.github.com> Date: Tue, 18 Mar 2025 10:56:04 +0100 Subject: [PATCH 3/4] updated doc --- .../configuration/00-overviewchart.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md index 19fd76341..7f7db769d 100644 --- a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md +++ b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md @@ -142,8 +142,8 @@ You can define custom tooltip templates to format the displayed data. - Date: {{model?.name | date:'dd/MM/yyyy'}}
- Value: {{model?.value | currency:'EUR'}} + Date: {{model?.name | oMoment : dateArgs}}
+ Value: {{model?.value | oCurrency : currencyArgs}}
Series Tooltip: {{model?.name}} - {{model?.value}} @@ -158,6 +158,15 @@ You can capture tooltip-related events and customize behavior. *TS* ```ts +currencyArgs: ICurrencyPipeArgument = { + currencySimbol: '€', + currencySymbolPosition: 'right', + grouping: true, + thousandSeparator: '.', + decimalSeparator: ',', + }; +dateArgs: IMomentPipeArgument = { format: 'DD/MM/YYYY' }; + activate(event: any) { console.log("Tooltip activated:", event); } From f9eacffb2996f6be4f1405c01e517cc308a60d47 Mon Sep 17 00:00:00 2001 From: tomfacal <88186642+tomfacal@users.noreply.github.com> Date: Tue, 18 Mar 2025 12:13:50 +0100 Subject: [PATCH 4/4] added default tooltip --- .../configuration/00-overviewchart.md | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md index 7f7db769d..702e178da 100644 --- a/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md +++ b/docs/addons/ontimize_web_ngx_charts/configuration/00-overviewchart.md @@ -128,11 +128,29 @@ export class CandlestickComponent { } } ``` -## Custom Tooltip Example + +## Tooltip + +Tooltips provide valuable contextual information for charts. You can either use the default tooltip or customize it according to your needs. + +### Default Tooltip + +In some cases, you may want to enable the default tooltip without customizing it with a template. To do this, you can simply use the `show-tooltip` property, and the chart will automatically display a default tooltip with the available data. + +In this example, the tooltip is enabled for a *Line Chart* without the need to define a custom template: + +*HTML* + +```html + + +``` +### Custom Tooltip Tooltips in charts provide valuable contextual information. This section explains how to customize tooltips for a *Line Chart* by modifying the date format, content, and style. -### Customizing Tooltip Content +#### Customizing Tooltip Content You can define custom tooltip templates to format the displayed data. @@ -151,7 +169,7 @@ You can define custom tooltip templates to format the displayed data.
``` -### Adding Interactivity +#### Adding Interactivity You can capture tooltip-related events and customize behavior.