我正在使用@gooddata/react-components版本的5.3.0来处理@gooddata/react-components组件。在大多数情况下,一切都如预期的那样运作。然而,我遇到了一个问题。
分析设计器允许我设计一个只有行或列的热图。通过指定没有trendBy属性的segmentBy属性,我可以使用只包含列的SDK呈现热图。
但是,当我试图通过指定没有segmentBy属性的trendBy属性来呈现只有行的heatmap时,我会得到以下错误消息:
ERROR TypeError: "viewByAttribute is undefined"
generateStackedDimensions
getResultSpec
getStackingResultSpec
Heatmap
_constructComponentWithoutOwner
measureLifeCyclePerf
_constructComponentWithoutOwner
_constructComponent
mountComponent
mountComponent
performInitialMount
mountComponent
mountComponent
mountComponentIntoNode下面是我用来创建组件的道具:
{
"projectId": "gzgbtigdh6iva4r8m56ht7i0s7dezb4i",
"config": {
"legend": {
"enabled": true,
"position": "bottom"
}
},
"sdk": {
...
},
"drillableItems": [
...
],
"measure": {
"measure": {
"localIdentifier": "3a155bf79d0f4adaa3a7f00a59633c0c",
"title": "Constituent actions",
"definition": {
"measureDefinition": {
"item": {
"uri": "/gdc/md/gzgbtigdh6iva4r8m56ht7i0s7dezb4i/obj/5996"
}
}
}
}
},
"segmentBy": {
"visualizationAttribute": {
"localIdentifier": "33bec35eab9b43a1a9fd33dc28360cbd",
"displayForm": {
"uri": "/gdc/md/gzgbtigdh6iva4r8m56ht7i0s7dezb4i/obj/33684"
}
}
},
"filters": [
{
"relativeDateFilter": {
"dataSet": {
"uri": "/gdc/md/gzgbtigdh6iva4r8m56ht7i0s7dezb4i/obj/1186"
},
"granularity": "GDC.time.month",
"from": -11,
"to": 0
}
}
]
}我为这个组件指定我的道具的方式有问题吗?
发布于 2018-09-03 08:23:21
谢谢你的提问。这是Heatmap实现中的一个错误。我们将在未来几天内修复它和发布补丁版本的@gooddata/react-components软件包,请使用工作的“只列”配置目前。Thx,如有任何不便,敬请原谅
更新:我们昨天发布了固定版本的- 5.3.1
https://stackoverflow.com/questions/52116754
复制相似问题