在“分析展现”节点下,创建一张透视分析。
选中透视分析,右键选择 编辑宏 进入报表宏界面。
- 在报表宏界面新建客户端模块,在弹出的新建模块对话框中选择对象为 INSIGHT;事件为 onRenderTable;并把下面宏代码复制到代码区域。
注意:需要表格宽度不能太大,适当时候需要调整图形宽度才能实现并排放置
宏类型
类型 | 对象 | 事件 |
---|---|---|
ClientSide | INSIGHT | onRenderTable |
宏代码
代码块 | ||||||
---|---|---|---|---|---|---|
| ||||||
function main(insight) { //改变图形的位置 if (insight.elem_graphConfig.parentNode != null) { insight.elem_graphConfig.parentNode.removeChild(insight.elem_graphConfig); insight.elem_grid.parentNode.appendChild(insight.elem_graphConfig); } if (insight.elem_graph.parentNode != null) { insight.elem_graph.parentNode.removeChild(insight.elem_graph); insight.elem_grid.parentNode.appendChild(insight.elem_graph); } //让他们并列显示 insight.elem_grid.style.float = "left"; insight.elem_grid.style.display = "inline-block"; insight.elem_graphConfig.style.display = "inline-block"; insight.elem_graph.style.display = "inline-block"; //修改图形和表格之间的间隔 insight.elem_graph.style.paddingLeft = "50px"; //修改条件输入框和表格之间的间隔 insight.elem_cond.style.paddingBottom = "50px"; } |
资源下载
资源:migrate.xml