...
设置方法
- 在资源定制节点下,创建一张透视分析。
- 选中透视分析,右键选择 编辑宏 进入报表宏界面。
- 在报表宏界面新建客户端模块,在弹出的新建模块对话框中选择对象为 INSIGHT;事件为 onRender;并把下面宏代码复制到代码区域。
宏类型
类型 | 对象 | 事件 |
---|---|---|
ClientSide | INSIGHT | onRenderonRenderTable |
宏代码
代码块 | ||||||
---|---|---|---|---|---|---|
| ||||||
function main(insight) { //改变图形的位置 insight.elem_graphConfig.parentNode.removeChild(insight.elem_graphConfig); insight.elem_graph.parentNode.removeChild(insight.elem_graph); insight.elem_grid.parentNode.appendChild(insight.elem_graphConfig); 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"; } |