1.10.4 • Published 1 month ago

@forter/kpi v1.10.4

Weekly downloads
79
License
Apache-2.0
Repository
github
Last release
1 month ago

fc-kpi

An element that represents a KPI

Usage

<script>
   import '@forter/kpi';
</script>

<fc-kpi></fc-kpi>

Examples

<!-- complex -->

<fc-kpi .results="${[{'items':[{'value':'96.74M','label':'Total Approval Rate','valueFontSize':28}],'icon':'admin','layout':'full', 'hoverColor': 'green', 'tooltip': 'Total approve rate takes all approved transactions out of the entire transaction volume'},{'items':[{'value':'3.452%','label':'Normalized Declines'}],'layout':'semi'},{'items':[{'value':'97.45%', 'label':'Normalized Approves','intent':'success'}], 'hoverRGB': 'var(--fc-purple-200)', 'icon':'admin','layout':'semi'},{'items':[{'value':'2.5453%','label':'Chargeback Rate','valueFontSize':28},{'value':'$4839','label':'Chargeback Amount (USD)'}],'layout':'full', 'hoverColor': 'red', 'tooltip': 'Chargeback rate is teh rate of CBs out of all approved transactions'},{'items':[{'value':'2938','label':'Fraud Accounts','valueFontSize':28},{'value':'48389','label':'Out of','flip':true}],'layout':'full', 'hoverColor': 'blue', 'tooltip': 'the number of fraud accounts forter forter tagged as bla blab bla bla bla sdfsdf bla v'},{'items':[{'value':'38%','label':'Approves'},{'value':'52%','label':'Of Total'}],'layout':'semi'},{'items':[{'value':'4738','label':'Declines'},{'value':'48%','label':'Out of','flip':true}],'layout':'semi'}]}"></fc-kpi>

<!-- secondary -->

<fc-kpi .results="${[{'items':[{'value':'96.74M', 'label':'Total Approval Rate'}, {'value':'96.74M'}], 'layout': 'full'}]}"></fc-kpi>

The aggregations object is an array of aggregations.

Each item in the array represents a single cell.

Optional Fields are: labelFontSize, labelColor, valueFontSize, valueColor, icon

This is an example of the most detailed object you can provide and its structure:

const aggregations = [
   {
     items: [
       {
         label: 'a translated label already',
         labelFontSize: 26,
         labelColor: 'red',
         value: 'any preformatted value',
         valueFontSize: 12,
         valueColor: 'var(--fc-red-500)'
       },
       {...}
     ],
     icon: 'check',
     layout: 'full'/'semi'
   },
   {...},
   {...},
   {...}
]

Properties

PropertyAttributeTypeDefaultDescription
fetchingfetchingbooleanfalseIs fetching state
hoverColorany
loadingloadingbooleanfalseIs loading state
resultsresultsKpiResult[]Array of cells
tooltipTemplateResult

CSS Custom Properties

PropertyDescription
--fc-kpi-item-paddingitem inner padding. default: 15px 25px, example: 20px 25px
--fc-kpi-label-0-font-sizefirst label font size. default: 13px, example: 15px
--fc-kpi-tooltip-y-positiontooltip y position. default: -75%, example: -50%
--fc-kpi-value-0-font-sizefirst value font size. default: 18px, example: 15px
1.10.4

1 month ago

1.10.3

1 month ago

1.10.2

2 months ago

1.10.1

11 months ago

1.10.0

2 years ago

1.9.4

2 years ago

1.9.3

2 years ago

1.9.2

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

4 years ago

1.2.14

4 years ago

1.2.13

4 years ago

1.2.12

4 years ago

1.2.10

4 years ago

1.2.11

4 years ago

1.2.9

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago