Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

图表SQL图表) 为您提供了另一种报表媒体。您可以灵活地定义自己的SQL查询,以确定您想要生成的图表,从多种图表类型。


Image Added

SQL图表 为您提供了另一种报表媒体。您可以灵活地定义自己的SQL查询,以确定您想要生成的图表,从多种图表类型。

Image Removed

图1:SQL图表属性

名称描述
自定义ID

物品链接slu </s>。可选字段。

Info
title独特的领域

在这里定义的值必须是唯一的用户视图菜单的其余部分,因为第一个匹配的名称将被调用。

标签菜单标签。必填项。
图表类型
  • 面积图
  • 条形图
  • 泡沫图表
  • 烛台图表
  • 甜甜圈图表
  • 折线图
  • 打开高低关闭图表(OHLC图表)
  • 饼形图
  • XY图表
图表标题

图表标题将显示在生成的图形的一部分。

...

Panel

...

名称描述X轴标签 X轴标签 X轴显示为

字符宽度。

code
borderColor
purple
borderWidth
1
titleBGColor
#ddccff
  • 类别
  • 日期
Y轴标签 
Y轴标签 
Y轴前缀
Y轴前缀
显示传奇?
如果选中,图例将显示在生成的图表中。
在图表中显示值标签?
如果选中,则值标签将显示在生成的图形中。
borderStylesolid
宽度 
title
100%
高度 

字符高度。

Code Block
title
300像素
颜色

系列颜色。可选字段。

颜色代码的逗号分隔值(CSV)。

例如

Code Block
title
 #3333FF,#66FF00,#FF9933,#990000

Image Removed

Code Block
titleExample
红,橙,黄,绿,蓝,靛

Image Removed

Info
title什么是默认颜色?

http://stackoverflow.com/questions/18332440/what-are-the-jqplot-default-series-colors

图3:SQL图表属性 - SQL

New Feature

This feature has been enhanced in Joget Workflow v6 to support join, group and aggregate function.

Image Added

图2:SQL图表属性 - Datasource

名称描述
Datasource
  • Using Data Binder
  • Default Datasource
  • Custom Datasource
Panel
borderColorpurple
borderWidth1
titleBGColor#ddccff
borderStylesolid
titleNew Feature

New feature in Joget Workflow for more flexible ways to build chart dataset using the existing Datalist Binders.

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查询 

SQL Query来生成图表类型所需的数据集。

Info

数据集中的第一列将假定为X轴/标签。标签, followed by value columns for the Y-axis.

例1:

Code Block
title
SELECT c_status as'status',COUNT(c_status)as'count'FROM app_fd_tix_tickets WHERE c_status IS NOT NULL GROUP BY c_status

例2:

Code Block
titleSQL
选择c.c_claimant,sum(cast(替换(c.c_total,'$','')为十进制(10,2)))为'total',avg(cast(replace(c.c_total,'$' '')作为十进制(10,2)))作为'平均'从app_fd_hr_expense_claim c组由c.c_claimant

Image Added

Figure 3: SQL Chart Properties - Data Binder & Chart Data Mapping (applicable for - using Data Binder)

NameDescription
Order ByColumn to be sorted in the graph dataset. This would affect how the graph is plotted.
Order
  • ASC
  • DESC
X-axis Value 
X-axis label. 
Y-axis Values
Y-axis dataset.

Image Added

图4:SQL图表属性 - UI- 图表选项 (applicable for - using Datasource)

名称描述
自定义标题HTML中的自定义标题。
自定义页脚HTML中的自定义页脚

图5:SQL图表属性 - 高级

X轴标签 
X轴标签 
X轴显示为
  • 类别
  • 日期
Y轴标签 
Y轴标签 
Y轴前缀
Y轴前缀
显示传奇?
如果选中,图例将显示在生成的图表中。
在图表中显示值标签?
如果选中,则值标签将显示在生成的图形中。
宽度 

字符宽度。

Code Block
title
100%
高度 

字符高度。

Code Block
title
300像素
颜色

系列颜色。可选字段。

颜色代码的逗号分隔值(CSV)。

例如

Code Block
title
 #3333FF,#66FF00,#FF9933,#990000

Image Added

Code Block
titleExample
红,橙,黄,绿,蓝,靛

Image Added

Info
title什么是默认颜色?

http://stackoverflow.com/questions/18332440/what-are-the-jqplot-default-series-colors

Image Added

Figure 5: SQL Chart Properties - Advanced

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

名称描述
数据源
  • 默认数据源
  • 自定义数据源
如果选择默认数据源,则下面的自定义JDBC设置将被忽略。
用户视图键名称

定义时,将使用此处定义的值作为参数,并使用userview键值作为值附加附加条件。

Info
titleExample

SQL:SELECT类别,计数(类别)FROM table1

用户视图键名称:类型

用户视图键值:val

: SELECT category, count(category) FROM table1

Userview Key Name: type

Userview Key Value: val

Resultant SQL:  SELECT category, count(category) FROM 结果SQL:SELECT类别,计数(类别)FROM table1 WHERE type = 'val'

当定义userview键值时,您可以在您的SQL查询中定义#userviewKey# ,使其替换为userview键值。When userview key value is defined, you may define #userviewKey# in your SQL query to have it replaced with the userview key value.

Info
titleExample

SQL:SELECT类别,count(类别)FROM : SELECT category, count(category) FROM table1 WHERE type = '#userviewKey##userviewKey#'

用户视图键值:val

Userview Key Value: val

Resultant SQL:  SELECT category, count(category) FROM 结果SQL:SELECT类别,计数(类别)FROM table1 WHERE type = 'val'

Custom Header
Custom Header in HTML.
Custom Footer
Custom Footer in HTML.

交互式图表

下面的代码可以修改并放在交互式Chart的“Custom Footer”中。

...