【发布时间】:2016-08-11 10:30:37
【问题描述】:
在 Google 树形图中,每个节点都必须有一个唯一的 ID,但两个节点可以有相同的名称 (https://groups.google.com/d/msg/google-visualization-api/UDLD-a-0PCM/IwVCGzsWOg8J)。
我使用了父/子演示中的架构 (http://www.iccube.com/support/documentation/user_guide/schemas_cubes/dim_parentchild.php)
只要节点的名称是唯一的,在树形图中使用以下 MDX 语句即可:
WITH
MEMBER [parent_name] as IIF( [dim (ALL)].[Hierarchy].currentmember
is [dim (ALL)].[Hierarchy].[ALL],'',
[dim (ALL)]. [Hierarchy].currentmember.parent.name )
SELECT
{[parent_name],[Measures].[value]} on 0,
non empty [dim (ALL)].[Hierarchy].members on 1
FROM
[Cube]
如果我将该行添加到 icCube 架构中的内存表中:
7,4,Spain, 2, 32
但是在渲染 Treemap 时西班牙的名称是双倍的。为了支持名称,GVI 表中的子定义应该是这样的:
{v:'uniqueID-Spain', f:'Spain'}
【问题讨论】:
-
如何添加一行?
-
我将此行添加到架构中的表中并再次加载架构。
-
如果我理解 Treemap 与问题无关。我迷路了,实际上问题出在哪里/在哪里?
-
内存表使用逗号分隔字段,而不是点逗号
-
我把整个表格中的逗号换成了分号,试着把这行写成原来的样子。
标签: google-visualization treemap iccube-reporting