Table of Contents |
---|
Introduction
The EChart Menu plugin is a new easy-to-use charting userview menu plugin for Joget DX, and can be considered as an alternative to the default bundled Chart Menu.
Just select any datalist in your app to display its records in several available graph types.
The additional benefits of using this plugin is the ability to reuse the datasource configuration & datalist filters in the selected datalist.
Also as a tip, you can also display multiple of these charts in a single page of a userview via Dashboard Menu.
Download this plugin from the Joget Marketplace here.
The JS library used: https://echarts.apache.org
This plugin source code is available in JogetOSS repository at https://github.com/jogetoss/echart-menu.
JogetOSS is a community-led team for open source software related to the Joget no-code/low-code application platform. Projects under JogetOSS are community-driven and community-supported, and you are welcome to contribute to the projects.
Figure 1: Multiple EChart userview menus displayed in a dashboard
EChart Menu Properties
Configure EChart Menu
Name | Description | |||||
---|---|---|---|---|---|---|
ID | Menu element unique ID. Userview will use this ID in the URL for the menu if Custom ID property is empty. | |||||
Custom ID | Item link slug. Optional field.
| |||||
Label | Menu label. Mandatory field. | |||||
Chart Title | Chart Title to be displayed as part of the generated chart. | |||||
Chart Theme | Choose from a wide selections of color themes for the chart. You can select "Custom" to define your own theme too. | |||||
Custom Theme JSON | This option appears when "Chart Theme" is set to "Custom". Follow the steps below to generate custom theme.
| |||||
Chart Library Version | Choose echart library version.
| |||||
Chart Type | Available chart types:
| |||||
Show Tabular Data |
| |||||
Show Export Links |
| |||||
Show Filters |
|
Data Mappings
Area Chart, Bar Chart, Line Chart, Donut Chart, Custom
See chart configuration documentation here:
- Area Chart & Line Chart - https://echarts.apache.org/en/option.html#series-line
- Bar Chart - https://echarts.apache.org/en/option.html#series-bar
- Donut Chart - https://echarts.apache.org/en/option.html#series-pie
Here expects JSON value(s) to modify the features or look-and-feel of the series.
For example, if a bar chart type is selected, to display the categories as a stacked bar chart, you can key in as such:
Code Block |
---|
{
stack : 'one',
label: {
show: true,
precision: 1,
valueAnimation: true
}
} |
To see all available chart types, see documentation here: https://echarts.apache.org/en/option.html#series
| |||||||||
Chart Library Version | Choose echart library version.
| ||||||||
Chart Type | Available chart types:
| ||||||||
Chart Dataset |
| ||||||||
Show Tabular Data | Show tabular data at the configured position.
| ||||||||
Show Export Links | This option is visible when "Show Tabular Data" is visible. Show or hide the export links located below the tabular data.
| ||||||||
Show Filters | Show or hide the filters on the top right of the chart. The filters are defined in the datalist chosen.
|
Data Mappings
Area Chart, Bar Chart, Line Chart, Donut Chart, Custom
Name | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
List | Target Datalist to read records from. | ||||||||||||||
X-axis Value | Datalist column to represent the x-axis or categories of the chart. | ||||||||||||||
Number Values |
|
Pie Chart
Name | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
List | Target Datalist to read records from. | |||||||||
X-axis Value | Datalist column to represent the categories of the pie chart. | |||||||||
Number Value | Datalist column to represent the category values of the pie chart. | |||||||||
Series Customization | See chart configuration documentation here: https://echarts.apache.org/en/option.html#series-pie Here expects JSON value(s) to modify the features or look-and-feel of the series. Examples:- Resize pie chart size
|
Chart Options
Area Chart, Line Chart
Name | Description |
---|---|
X-axis Label | Label for the X-axis. |
X-Axis Display as | To display the X-axis value as:
|
Y-axis Label | Label for the Y-axis. |
No Boundary Gap | If checked, there will be no gaps on the sides of the chart within the plot area. |
Smooth Line | If checked, the chart line(s) will be curved in order to appear smooth. Else, chart line(s) will be straight lines connecting the plotted data points. This option is ignored if Series Customization property is set. |
Show Legend | If checked, chart legend will be shown. |
Show Tool Tip | If checked, when mousing over the data points, additional information about the data point will be displayed. |
Width | Maximum Width of chart. |
Height | Minimum Height of chart. |
Number and Currency Formatting
Name | Description | ||||||
---|---|---|---|---|---|---|---|
Enable Data Labels | If checked, the chart will display data labels next to each data point. | ||||||
Formatting Style | Defines the style in which numbers and currency are formatted. Refer to the available options:
| ||||||
Prefix | Allows to add a custom prefix to the number, such as a currency symbol or text (Example: | ||||||
Postfix | Allows you to add a custom postfix to the number, such as a currency symbol or text (Example: | ||||||
Disable Decimal | If checked, decimal places will be hidden, and numbers will be displayed as whole numbers. | ||||||
Use Thousand Separator | If checked, numbers will be grouped by thousands for easier readability (e.g., 1,000 instead of 1000). |
Bar Chart
Name | Description |
---|---|
X-axis Label | Label for the X-axis. |
X-Axis Display as | To display the X-axis value as:
|
Y-axis Label | Label for the Y-axis. |
No Boundary Gap | If checked, there will be no gaps on the sides of the chart within the plot area. |
Show Legend | If checked, chart legend will be shown. |
Display as Horizontal Chart? | If checked, the X-axis and Y-axis will be swapped to represent the data horizontally. |
Show Tool Tip | If checked, when mousing over the data points, additional information about the data point will be displayed. |
Width | Maximum Width of chart. |
Height | Minimum Height of chart. |
Number and Currency Formatting
Name | Description | ||||||
---|---|---|---|---|---|---|---|
Enable Data Labels | If checked, the chart will display data labels next to each data point. | ||||||
Formatting Style | Defines the style in which numbers and currency are formatted. Refer to the available options:
| ||||||
Prefix | Allows to add a custom prefix to the number, such as a currency symbol or text (Example: | ||||||
Postfix | Allows you to add a custom postfix to the number, such as a currency symbol or text (Example: | ||||||
Disable Decimal | If checked, decimal places will be hidden, and numbers will be displayed as whole numbers. | ||||||
Use Thousand Separator | If checked, numbers will be grouped by thousands for easier readability (e.g., 1,000 instead of 1000). |
Donut Chart
Name | Description |
---|---|
Show Legend | If checked, chart legend will be shown. |
Show Tool Tip | If checked, when mousing over the data points, additional information about the data point will be displayed. |
Width | Maximum Width of chart. |
Height | Minimum Height of chart. |
Number and Currency Formatting
Name | Description | ||||||
---|---|---|---|---|---|---|---|
Enable Data Labels | If checked, the chart will display data labels next to each data point. | ||||||
Formatting Style | Defines the style in which numbers and currency are formatted. Refer to the available options:
| ||||||
Prefix | Allows to add a custom prefix to the number, such as a currency symbol or text (Example: | ||||||
Postfix | Allows you to add a custom postfix to the number, such as a currency symbol or text (Example: | ||||||
Disable Decimal | If checked, decimal places will be hidden, and numbers will be displayed as whole numbers. | ||||||
Use Thousand Separator | If checked, numbers will be grouped by thousands for easier readability (e.g., 1,000 instead of 1000). |
Pie Chart
Name | Description |
---|---|
Show Legend | If checked, chart legend will be shown. |
Show Value Label in Chart? | If checked, the category values will be shown. This option is ignored if Series Customization property is set. |
Show Tool Tip | If checked, when mousing over the data points, additional information about the data point will be displayed. |
Width | Maximum Width of chart. |
Height | Minimum Height of chart. |
Number and Currency Formatting
Name | Description | ||||||
---|---|---|---|---|---|---|---|
Enable Data Labels | If checked, the chart will display data labels next to each data point. | ||||||
Formatting Style | Defines the style in which numbers and currency are formatted. Refer to the available options:
| ||||||
Prefix | Allows to add a custom prefix to the number, such as a currency symbol or text (Example: | ||||||
Postfix | Allows you to add a custom postfix to the number, such as a currency symbol or text (Example: | ||||||
Disable Decimal | If checked, decimal places will be hidden, and numbers will be displayed as whole numbers. | ||||||
Use Thousand Separator | If checked, numbers will be grouped by thousands for easier readability (e.g., 1,000 instead of 1000). |
Custom
Examples as below:
Code Block |
---|
{"type" : "line"} |
Code Block |
---|
{"type" : "pie",
"radius" : "40%",
"center": ["50%", "25%"],
"label": {
"formatter": "{a} {b}: {@2012} ({d}%)"
}
} |
Pie Chart
See chart configuration documentation here: https://echarts.apache.org/en/option.html#series-pie
Here expects JSON value(s) to modify the features or look-and-feel of the series.
Chart Options
Area Chart, Line Chart
To display the X-axis value as:
- Category
- Number
- Date
If checked, the chart line(s) will be curved in order to appear smooth. Else, chart line(s) will be straight lines connecting the plotted data points.
This option is ignored if Series Customization property is set.
Name | Description | ||
---|---|---|---|
X-axis Label | Label for the X-axis. | ||
X-Axis Display as | To display the X-axis value as:
| Y-axis Label |
|
No Boundary Gap | If checked, there will be no gaps on the sides of the chart within the plot area. | ||
Show Legend | If checked, chart legend will be shown. | ||
Display as Horizontal Chart? | If checked, the X-axis and Y-axis will be swapped to represent the data horizontally. | ||
Show Tool Tip | If checked, when mousing over the data points, additional information about the data point will be displayed. | ||
Width | Maximum Width of chart. | ||
Height | Minimum Height of chart. |
Donut Chart
Name | Description |
---|---|
Show Legend | If checked, chart legend will be shownwill be swapped to represent the data horizontally. |
Show Tool Tip | If checked, when mousing over the data points, additional information about the data point will be displayed. |
Width | Maximum Width of chart. |
Height | Minimum Height of chart. |
Number and Currency Formatting
Name | Description |
---|
If checked, the category values will be shown.
This option is ignored if Series Customization property is set.
Custom
To display the X-axis value as:
- Category
- Number
- Date
Advanced
General
For all customizable properties, see documentation here: https://echarts.apache.org/en/option.html
Here expects JSON value(s) to customize the overall chart functions or look-and-feel.
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
grid : {
top: "55%"
},
tooltip : {
"trigger": "item",
"formatter": "{a} {b}: {c} ({d}%)"
} |
If label is too long, use the following code
Code Block | ||
---|---|---|
| ||
grid: { containLabel: true } |
Userview Key Data Filter
When defined, the additional conditions will be appended using the value defined here as the parameter and the userview key value as the value.
Info | ||
---|---|---|
| ||
SQL: SELECT category, count(category) FROM table1 Userview Key Name: type Userview Key Value: val Resultant SQL: SELECT category, count(category) FROM table1 WHERE type = 'val' |
When userview key value is defined, you may define #userviewKey# in your SQL query to have it replaced with the userview key value.
Info | ||
---|---|---|
| ||
SQL: SELECT category, count(category) FROM table1 WHERE type = '#userviewKey#' Userview Key Value: val Resultant SQL: SELECT category, count(category) FROM table1 WHERE type = 'val' |
Enable Data Labels | If checked, the chart will display data labels next to each data point. | ||||||
Formatting Style | Defines the style in which numbers and currency are formatted. Refer to the available options:
| ||||||
Prefix | Allows to add a custom prefix to the number, such as a currency symbol or text (Example: | ||||||
Postfix | Allows you to add a custom postfix to the number, such as a currency symbol or text (Example: | ||||||
Disable Decimal | If checked, decimal places will be hidden, and numbers will be displayed as whole numbers. | ||||||
Use Thousand Separator | If checked, numbers will be grouped by thousands for easier readability (e.g., 1,000 instead of 1000). |
Advanced
General
Name | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Additional Customization | For all customizable properties, see documentation here: https://echarts.apache.org/en/option.html Here expects JSON value(s) to customize the overall chart functions or look-and-feel. Example:
If label is too long, use the following code
|
Userview Key Data Filter
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Userview Key Name | When defined, the additional conditions will be appended using the value defined here as the parameter and the userview key value as the value.
When userview key value is defined, you may define #userviewKey# in your SQL query to have it replaced with the userview key value.
|
UI
Name | Description |
---|---|
Custom Header | Custom Header in HTML. |
Custom Footer | Custom Footer in HTML. |
Performance & Offline
Cache Settings
Name | Description |
---|---|
Scope | Caching options are:
|
Duration (s) | Duration in seconds to cache content, defaults to 20 seconds if applicable. |
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Read more at Performance Improvement with Userview Caching. |
PWA Offline Settings
Note: PWA Offline support is dependent on the theme used.
Name | Description |
---|---|
Enable cache for offline support | Enable caching for offline support, usually set for use on mobile browsers. |
Read Progressive Web Application (PWA) for more information.
Download Sample App
View file | ||||
---|---|---|---|---|
|
Change Logs
7.0.3 Beta
[ MODIFIED ] : Supports echart library 5.0.2
[ MODIFIED ] : Support custom theme
[ MODIFIED ] : Show datalist formatter value instead of original databinder value.
[ MODIFIED ] : Option to show/hide tabular data, filters, export links, chart dataset scope.
7.0.2 Beta
[ FIXED ] : Date picker missing and showing no data message.
UI
Performance & Offline
Cache Settings
Name
Description
Caching options are:
- None: No caching.
- Application: Cache content by application where all users will see the same content.
- User: Cache by username.
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Read more at Performance Improvement with Userview Caching. |
PWA Offline Settings
Note: PWA Offline support is dependent on the theme used.
Name
Description
Read Progressive Web Application (PWA) for more information.
Download Sample App
Change Logs7.0.1 Beta
[ FIXED ] : Labels not showing Properly.
[ FIXED ] : Label on Donut chart not showing Properly.
7.0.0 Beta
[ ADDED ] : Initial Release.