Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Error when importing 'powerbi-visuals-utils-tooltiputils'

To start with, I was attempting to add report page tooltips to my visuals and looking into 'powerbi-visuals-utils-tooltiputils', which was introduced in this tutorial (https://github.com/microsoft/powerbi-visuals-utils-tooltiputils/blob/master/docs/api/tooltipservice....). however, in VS Code I got the error that namespace 'powerbi.extensibility' has no exported member 'utils'. 

 

Can someone point me in the right direction?

 

This is the error I got:

image.png

My package.json

 

{
  "name": "visual",
  "scripts": {
    "pbiviz": "pbiviz",
    "start": "pbiviz start",
    "package": "pbiviz package",
    "lint": "tslint -r \"node_modules/tslint-microsoft-contrib\"  \"+(src|test)/**/*.ts\""
  },
  "dependencies": {
    "@babel/polyfill": "^7.4.4",
    "@babel/runtime": "^7.4.5",
    "@babel/runtime-corejs2": "^7.4.5",
    "@types/d3": "5.5.0",
    "core-js": "^2.6.8",
    "d3": "5.5.0",
    "powerbi-models": "^1.2.0",
    "powerbi-visuals-api": "~2.6.0",
    "powerbi-visuals-tools": "^2.5.0",
    "powerbi-visuals-utils-dataviewutils": "^2.2.0",
    "powerbi-visuals-utils-interactivityutils": "^4.4.0",
    "powerbi-visuals-utils-tooltiputils": "^1.0.0"
  },
  "devDependencies": {
    "ts-loader": "5.2.2",
    "typescript": "3.0.1"
  }
}

My pbivi.json

 

{
    "visual": {
        "name": "newVisual",
        "displayName": "newVisual",
        "guid": "newVisual13C8D3E140884625B63E87B293DB8A16",
        "visualClassName": "Visual",
        "version": "1.0.0",
        "description": "",
        "supportUrl": "",
        "gitHubUrl": ""
    },
    "apiVersion": "2.6.0",
    "author": {
        "name": "",
        "email": ""
    },
    "assets": {
        "icon": "assets/icon.png"
    },
    "externalJS": [
        "node_modules/d3/d3.min.js",
        "node_modules/powerbi-visuals-utils-tooltiputils/lib/index.js"
    ],
    "style": "style/visual.less",
    "capabilities": "capabilities.json",
    "dependencies": null,
    "stringResources": []
}

My tsconfig.json

{
    "compilerOptions": {
        "allowJs": false,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "target": "es6",
        "sourceMap": true,
        "outDir": "./.tmp/build/",
        "moduleResolution": "node",
        "declaration": true,
        "lib": [
            "es2015",
            "dom"
        ]
    },
    "files": [
        "src/visual.ts",
        "node_modules/powerbi-visuals-utils-tooltiputils/lib/index.d.ts",
        "node_modules/powerbi-visuals-api/index.d.ts"
    ]
}

Thank you

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Anonymous,
If you're using the latest tooling, the doc is out of date unfortunately. Its answered here though: https://community.powerbi.com/t5/Custom-Visuals-Development/Tooltips-custom-visuals/m-p/731308/highlight/true#M2329
Hopefully this helps you out,
Daniel




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

2 REPLIES 2
dm-p
Super User
Super User

Hi @Anonymous,
If you're using the latest tooling, the doc is out of date unfortunately. Its answered here though: https://community.powerbi.com/t5/Custom-Visuals-Development/Tooltips-custom-visuals/m-p/731308/highlight/true#M2329
Hopefully this helps you out,
Daniel




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

Thanks @dm-p 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.