You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

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


Figure 1: Multiple EChart userview menus displayed in a dashboard

EChart Menu Properties

Configure EChart Menu

NameDescription
IDMenu 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.

Ensure that value defined here is unique to other userview menus in the app, since the first matching/conflicting ID will take precedence in page loading.

LabelMenu label. Mandatory field.
Chart TitleChart Title to be displayed as part of the generated chart.
Chart Theme

Choose from a wide selections of color schemes for the chart.

Chart Type

Available chart types:

  • Area Chart
  • Bar Chart
  • Line Chart
  • Donut Chart
  • Pie Chart
  • Custom

With the Custom option, you can define multiple charts and chart types in a single page to represent different sets or interpretations from the same datasource.

Additional configurations required to define chart type(s) for each of the number value(s). See Data Mappings below.

Data Mappings

Area Chart, Bar Chart, Line Chart, Donut Chart, Custom

NameDescription
ListTarget Datalist to read records from.
X-axis ValueDatalist column to represent the x-axis or categories of the chart.
Number Values
PropertyDescription
Number ValueDatalist column to represent the category values of the chart.
Show Value Label in Chart?Check this option to display the category values on the chart.
Series Customization

See chart configuration documentation here: https://echarts.apache.org/en/option.html#series

Here expects JSON value(s) to modify the function or look-and-feel of the chart.

For example, if a bar chart type is selected, to display the categories as a stacked bar chart, you can key in as such:

{
    stack : 'one',
	label: {
        show: true,
        precision: 1,
        valueAnimation: true
    }
}


If Chart Type selected is Custom, a chart type and any of its necessary properties must be defined.
Examples as below:

{"type" : "line"}
{"type" : "pie",
 "radius" : "40%",
 "center": ["50%", "25%"],
 "label": {
   "formatter": "{a} {b}: {@2012} ({d}%)"
 }
}


You can also download the sample app in this page below to use as a reference.

Pie Chart

NameDescription
ListTarget Datalist to read records from.
X-axis ValueDatalist column to represent the categories of the pie chart.
Number ValueDatalist 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 function or look-and-feel of the pie chart.

Chart Options

Area Chart

NameDescription
X-axis LabelLabel for the X-axis.
X-Axis Display as

To display the X-axis value as:

  • Category
  • Number
  • Date
Y-axis LabelLabel for the Y-axis.
No Boundary GapIf checked, there will be no gaps on the sides of the chart.
Smooth Line

If checked, the chart line(s) will be curved in order to appear smooth. Else, chart line(s) will be straight line connecting the plotted data points.

This option is ignored if Series Customization property is set.

Show LegendIf checked, chart legend will be shown.
Show Tool TipIf checked, when mousing over the data points, additional information about the data point will be displayed.
WidthMaximum Width of chart.
HeightMinimum Height of chart.
NameDescription
Show Legend
Show Value Label in Chart
Show Tool Tip
WidthMaximum Width of chart.
HeightMinimum Height of chart.

Advanced

General

NameDescription
Additional Customization
Sample
grid : {
	top: "55%"
}, 
tooltip : {
	"trigger": "item", 
	"formatter": "{a} {b}: {c} ({d}%)"
}

Userview Key Data Filter

NameDescription
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.

Example

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.

Example

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'

UI

NameDescription
Custom HeaderCustom Header in HTML.
Custom FooterCustom Footer in HTML.

Performance & Offline

Cache Settings

Name

Description

Scope

Caching options are:

  • None: No caching.
  • Application: Cache content by application where all users will see the same content.
  • User: Cache by username.
Duration (s)Duration in seconds to cache content, defaults to 20 seconds if applicable.


PWA Offline Settings

Note: PWA Offline support is dependent on the theme used.

Name

Description

Enable cache for offline supportEnable caching for offline support, usually set for use on mobile browsers.

Read Progressive Web Application (PWA) for more information.


Download Sample App

APP_echart_demo.jwa




  • No labels