在Spotfire

时间:2016-12-02 14:44:08

标签: javascript d3.js data-visualization spotfire

我遇到了一个问题,我需要在Spotfire中为D3 VennDiagram Visualization添加标记,我尝试添加下面的代码,但它无法执行标记:

Hi Team,

我无法为VennDiagram或TIBCO为D3提供的任何其他JSViz样本添加标记。

您可以从以下网址下载DXP文件:https://drive.google.com/folderview?id=0B7rSzsao8vgUUlEyc0hWUk13WmM

我使用以下代码添加标记,但它失败了:

function markModel(markMode, rectangle) {
if (svg) {
    // No point in continuing if we don't have an svg object
    // Start collecting indexes of svg objects marked.
    var indicesToMark = [];
    var markData = {};
    markData.markMode = markMode;


    svgElem = svg[0][0];
    var rpos = svgElem.createSVGRect();
    rpos.x = rectangle.x;
    rpos.y = rectangle.y;
    rpos.height = rectangle.height; // + one to get the item under the click
    rpos.width = rectangle.width; // + one to get the item under the click
    var elements = svgElem.getIntersectionList(rpos, svgElem);
    for (var index = 0; index < elements.length; index = index + 1) {
        if (elements[index].id) {
            indicesToMark.push(elements[index].id);
        }
    }

    markData.indexSet = indicesToMark;

    markIndices ( markData );
}

请让我知道您对此的看法

0 个答案:

没有答案