Changed on:
8 Feb 2024
This component is a chart that indicates progress and consists of an arc with two sectors (active and inactive) and two texts - primary (big bold one) and secondary (normal size and font weight).
Plugin Name | Charts |
---|
Chart component for use within a Fluent OMX web app.
Charts UI
fc.chart.gauge
The Gauge chart component can be included in any mystique page.
The component takes as a value
`const number`
`template {{ path.to.chart.value }}`
1{
2 "component": "fc.chart.gauge",
3 "props": {
4 "value": "40",
5 "primaryText": "40",
6 "secondaryText": "Secondary text",
7 "colorConfig": {
8 "active": [
9 [0, "#ff6d00"],
10 [50, "#4CAF50"]
11 ]
12 }
13 }
14}
Language: json
Name: Example
Description:
[Warning: empty required content area]Name | Type | Required | Default | Description |
value |
| no | none | Number in the range [0, 100] - percent that will be used to indicate the active part of the chart arc. |
template |
| no | none | A Handlebars template to calculate chart value based on the datasource field. |
primaryText |
| no | none | Big bold text in the center of the chart. |
secondaryText |
| no | none | Small text to be displayed under the primary text. |
colorConfig |
| no | none | Color configuration object - allows the change of default colors of the chart. |
arc |
| no | {startAngle: 210, | The property allows the display of data percentage line. |
chartContainerConfig |
| no | The property allows to make charts adapt to the size of the parent container. One of the props width and height should be a percentage string. | |
title |
| no | none | Chart card title. |
width | CardWidth (
| no |
| Define the width of the card on a 12-column grid. Can use the named widths for readability or numbers directly. On mobile devices, all widths will automatically change to 12 for the best responsive experience. The default is "full" and will take up the full width of the containing component. |
noCard |
| no | none | If set to
|
Arc
Name | Type | Required | Default | Description |
startAngle |
| no | 210 | The start angle of 1st sector. |
endAngle |
| no | -30 | The end angle of the last sector. |
innerRadius |
| no | “82%” | The inner radius of all sectors. |
outerRadius |
| no | “93%” | The outer radius of all the sectors. |
cx |
| no | “50%” | The x coordinate of the center. |
cy |
| no | “50%” | The y coordinate of center. |
ColorConfig
Name | Type | Required | Default | Description |
active |
| no | none | Color for the active sector. Set in HEX-format. Example for string:
Example for ColorMap (
|
inactive |
| no | none | Color for the inactive sector. Set in HEX-format. Example for string:
Example for ColorMap (
|
primaryText |
| no | none | Color for primary text. Set in HEX-format. Example:
|
secondaryText |
| no | none | Color for secondary text. Set in HEX-format. Example:
|
ChartContainerConfig
Name | Type | Required | Default | Description |
width |
| no |
| The percentage value of the chart's width or a fixed width. |
aspect |
| no |
| Width/height. If specified, the height will be calculated by width/aspect. |
maxHeight |
| no |
| The maximum height of the container. |
height |
| no | none | The percentage value of the chart's width or a fixed height. Example:
|
minWidth |
| no | none | The minimum width of the container. Example:
|
minHeight |
| no | none | The minimum height of the container. Example:
|
1{
2 "component": "fc.chart.gauge",
3 "props": {
4 "value": "{{node.edges.0.percent}}",
5 "primaryText": "5k",
6 "secondaryText": "Input Events Total",
7 "colorConfig": {
8 "active": [
9 [0, "#ff6d00"],
10 [50, "#4CAF50"]
11 ]
12 }
13 }
14}
Language: json
Gauge Chart Component description
None
Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.