Forum Discussion

ats1958's avatar
ats1958
Helper II
8 years ago
Solved

Adding ToolTips with Table DataBinding

I've created a custom visual (combination scatter plot and dual-line graph) and am attempting to add tooltips. I used table databinding and followed an example I found here for assigning an Identity....
  • v-viig's avatar
    8 years ago

    It seems the issue is related to sending numbers as values to Tooltip API but numbers are not supported and numbers must be converted to string explicitly.

    Please use this code snippet in the code:

     viewModel.rangePenData.push({
                        grade: <number>view1.rows[i][1],
                        rangePen: <number>view1.rows[i][3],
                        employeeID: <string>view1.rows[i][0],
                        identity: this.getSelectionIds(view2, this.host),
                        tooltips: [{
                            displayName: "Employee ID:",
                            value: `${view1.rows[i][0]}`
                        },
                        {
                            displayName: "Range Penetration:",
                            value: `${view1.rows[i][3]}`
                        }
                    ]
                    });

    Ignat Vilesov,

    Software Engineer

     

    Microsoft Power BI Custom Visuals

    [email protected]