Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
图表 (SQL图表) 为您提供了另一种报表媒体。您可以灵活地定义自己的SQL查询,以确定您想要生成的图表,从多种图表类型。 |
图1:SQL图表属性
名称 | 描述 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
自定义ID | 物品链接slu </s>。可选字段。
| |||||||||||||
标签 | 菜单标签。必填项。 | |||||||||||||
图表类型 |
| |||||||||||||
图表标题 | 图表标题将显示在生成的图形的一部分。
|
图2:SQL图表属性 - Datasource
名称 | 描述 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Datasource |
| |||||||||||||
Data Binder | When Datasource is set to "Using Data Binder", this option will show up. Please see Datalist Binder for available binder to use. | |||||||||||||
SQL查询 | When Datasource is set to use any of the "Datasource", this option will show up. SQL Query来生成图表类型所需的数据集。
例1:
|
SQL Chart equips you with another medium of reporting by using charts. You are given the flexibility of defining your own SQL query to determine the charts that you would like to generate, ranging from a number of graph types.
Figure 1: SQL Chart Properties
Name | Description | |||||
---|---|---|---|---|---|---|
Custom ID | Item link slug. Optional field.
| |||||
Label | Menu label. Mandatory field. | |||||
Chart Type |
| |||||
Chart Title | Chart Title to be displayed part of the generated graph. |
Figure 2: SQL Chart Properties - Chart Options
Name | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X-axis Label | X-axis Label | |||||||||||||||
X-axis display as |
| |||||||||||||||
Y-axis Label | Y-axis Label | |||||||||||||||
Y-axis Prefix | Y-axis Prefix | |||||||||||||||
Show Legend? | If checked, legend will be shown in the generated graph. | |||||||||||||||
Show Value Label in Chart? | If checked, value label will be shown in the generated graph. | |||||||||||||||
Width | Width in character.
| |||||||||||||||
Height | Height in character.
| |||||||||||||||
Colors | Series color. Optional field. Comma separated values (CSV) of color codes. Example:
|
Figure 3: SQL Chart Properties - SQL
Name | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SQL Query | SQL Query to produce the dataset required for the graph type.
Example 1:
Example 2:例2:
|
Figure 43: SQL Chart Properties - UI- Data Binder & Chart Data Mapping (applicable for - using Data Binder)
Name | Description |
---|---|
Custom Header | Custom Header in HTML. |
Custom Footer | Custom Footer in HTML. |
Order By | Column to be sorted in the graph dataset. This would affect how the graph is plotted. |
Order |
|
X-axis Value | X-axis label. |
Y-axis Values | Y-axis dataset. |
图4:SQL图表属性 - 图表选项 (applicable for - using Datasource)
名称 | 描述 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
X轴标签 | X轴标签 | |||||||||||||||
X轴显示为 |
| |||||||||||||||
Y轴标签 | Y轴标签 | |||||||||||||||
Y轴前缀 | Y轴前缀 | |||||||||||||||
显示传奇? | 如果选中,图例将显示在生成的图表中。 | |||||||||||||||
在图表中显示值标签? | 如果选中,则值标签将显示在生成的图形中。 | |||||||||||||||
宽度 | 字符宽度。
| |||||||||||||||
高度 | 字符高度。
| |||||||||||||||
颜色 | 系列颜色。可选字段。 颜色代码的逗号分隔值(CSV)。 例如:
|
Figure 5: SQL Chart Properties - Advanced
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Datasource |
If the default datasource is selected, the custom JDBC settings below will be ignored. | ||||||||||
Userview Key Name | When defined, additional condition 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.
|
The following code can be modified and put in "Custom Footer" for interactive Chart.
Custom Header | Custom Header in HTML. |
Custom Footer | Custom Footer in HTML. |
交互式图表
下面的代码可以修改并放在交互式Chart的“Custom Footer”中。
Code Block |
---|
<SCRIPT>
$(文件)。就绪(函数() |
Code Block |
<script> $(document).ready(function(){ $( $('#jq#jq_plot_chart').bind()。绑定( 'jqplotDataClick',, function (event, seriesIndex, pointIndex, data) 函数(event,seriesIndex,pointIndex,data){ console.log(event)的console.log(事件); console.log(seriesIndex)的console.log(seriesIndex); console.log(pointIndex)的console.log(pointIndex); console.log(data)的console.log(数据); //for chart which used legend and x-axis, 对于使用图例和x轴的图表, var xaxis = $(".jqplot$(“。jqplot-xaxis-tick:eq("tick:eq(”+ pointIndex +")")“)”); var series = $(".jqplot$(“。jqplot-table-legend-label:eq("label:eq(”+ seriesIndex +")")“)”); console.log("x-axis :" log(“x-axis:”+ xaxis.text())text()); console.log("series :" log(“series:”+ series.text())text()); } )); //for double click event. Please note the arguments are different. $('#jq /双击事件。请注意,论据是不同的。 $( '#jq_plot_chart').bind()。绑定( 'jqplotDblClick',, function (event, coordinate, points, data) 功能(事件,坐标,点数据){ console.log(event)的console.log(事件); console.log(coordinate)的console.log(坐标); console.log(points)的console.log(分); console.log(data)的console.log(数据); if (data) 如果(数据){ var xaxis = $(".jqplot$(“。jqplot-xaxis-tick:eq("tick:eq(”+ data.pointIndex +")")“)”); var series = $(".jqplot$(“。jqplot-table-legend-label:eq("label:eq(”+ data.seriesIndex +")")“)”); console.log("values :" log(“values:”+ data.data)data); console.log("x-axis :" log(“x-axis:”+ xaxis.text())text()); console.log("series :" log(“series:”+ series.text())text()); } } )); })); </script> SCRIPT> |
Note |
---|
This code does not work with OHLC and candlestick chart. 此代码不适用于OHLC和烛台图表。 |
Panel | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
您可以在此UserView元素中配置“ 性能”设置,以允许缓存现有内容以提高性能和加载速度。使用Userview缓存进行性能改进,了解更多信息。You can configure the Performance settings in this Userview Element which allows one to cache existing content for improved performance and loading speed. Read more at Performance Improvement with Userview Caching. |