[ANALYTICS-120] Refactor API for supporting common simple text case Created: 20/Feb/20 Updated: 18/Mar/20 Resolved: 04/Mar/20 |
|
| Status: | Closed |
| Project: | Analytics |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.1 |
| Type: | Task | Priority: | Neutral |
| Reporter: | Trung Luu | Assignee: | Chuong Doan Huy |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 5h | ||
| Time Spent: | 1d 2.5h | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Acceptance criteria: |
Empty
|
| Task DoR: |
Empty
|
| Documentation update required: |
Yes
|
| Date of First Response: | |
| Epic Link: | ABTEST UI |
| Sprint: | Add-Ons 32 |
| Story Points: | 3 |
| Description |
|
Currently We define abstractSimpleDataSupplier for checking and rendering the text case that not an instance of amChart. We have to refactor the API upper such as simpleChartDefinition instead. AC:
|
| Comments |
| Comment by Chuong Doan Huy [ 05/Mar/20 ] |
|
Hi jlegendre, Here are some information that you can refer when add/update document related to this : We created a new type of chart (beside AmChart), it's a simple chart with only icon and text (see attached image). Example chart configuration : chartDefinitions: chart-1: dataSupplier: testResultsDataSupplier ==> any data supplier is ok, refer to the data supplier we declared below label: Unique visitors ==> label of a chart class: info.magnolia.analytics.common.SimpleChartDefinition ==> this class is simple text chart icon: icon-user-public ==> choose any of Magnolia provided icons propertyOrJsonPath: $.get_rate[0].nb_uniq_visitors ==> value displayed on the chart. Because all of the data suppliers must return JSON, we can specify a property in that JSON or use jsonPath to point to value we want to display (this config will get first nb_uniq_visitors in attached testResults.json which is 174651) ---------------- dataSuppliers: testResultsDataSupplier: class: info.magnolia.abtesting.app.datasupplier.TestResultsDataSupplier |
| Comment by Julie Legendre [ 05/Mar/20 ] |
|
Hi Chuong, thank you very much for the info. I've created https://jira.magnolia-cms.com/browse/ANALYTICS-124 to add this to docs. :bow: |