GithubHelp home page GithubHelp logo

microsoft / powerbi-visuals-utils-tooltiputils Goto Github PK

View Code? Open in Web Editor NEW
18.0 17.0 28.0 1.03 MB

tooltip utility interfaces for creating powerbi custom visuals

License: Other

JavaScript 9.64% TypeScript 90.36%

powerbi-visuals-utils-tooltiputils's Introduction

Microsoft Power BI visuals TooltipUtils

Build npm version npm

TooltipUtils is a set of functions and classes in order to simplify usage of the Tooltip API for Power BI custom visuals

Usage

Learn how to install and use the TooltipUtils in your custom visuals:

Contributing

License

See the LICENSE file for license rights and limitations (MIT).

powerbi-visuals-utils-tooltiputils's People

Contributors

adiletelf avatar alekssavelev avatar avisander avatar blackleaden avatar demonkratiy avatar eugeneelkin avatar ignatvilesov avatar kirillter avatar kulljul avatar microsoft-github-policy-service[bot] avatar mrmeison avatar mulyukovaidar avatar savvinsergey avatar uve avatar zbritva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powerbi-visuals-utils-tooltiputils's Issues

Tooltip positioning incorrect in Power BI Desktop App

The tooltip positioning is correct in powerbi.com using Chrome, Edge, and IE (haven't checked any other browsers), but it is way off in the Power BI Desktop App.

Here are a few screenshots showing the issue. I've also created a very simple visual with a single SVG circle, and it has the exact same issue. Here

Any ideas on why the positioning is so far off?

Thanks!

Powerbi.com in Chrome
Powerbi.com in Chrome

Power BI Desktop
Power BI Desktop

Very simple circle Power BI Desktop
Very simple circle Power BI Desktop

Wrong tooltip placement on page change

Hi,
I have a custom visual that uses the provided tooltip utils. Unfortunately, when changing pages on app.powerbi.com, the tooltip stops showing at the correct position, and is instead placed in the upper left left corner of the web page. Going through the un-uglified code, I noticed that there seems to be an issue with the internal value "scale" being undefined. Changing slicers and even resizing the browser window seems to solve it.
The specific code (in https://app.powerbi.com/13.0.13035.262/scripts/powerbiportal.common.bundle.min.js ) is fixCoordinates = function(e) { if (/Edge\/\d./i.test(navigator.userAgent) && $("body.fullScreen").length > 0) return e; var t = this.element.offset(); return e[0] = e[0] * this.scale + t.left, e[1] = e[1] * this.scale + t.top, e }

Struggling to add tooltips. `mouseEvent` is null.

Hi. I'm trying to add tooltips to the custom visuals. The docs appear to be out of date. Especially the usage guide.

I've managed to import it despite the examples shown on that page. Right now when I'm attempting to show a tooltip, I'm met with with mouseEvent is null error coming from the console.

This error looks to be coming from

const mouseEvent: MouseEvent = this.getEvent();

Any help would be appreciated.

Thanks

Uncaught SyntaxError: Cannot use import statement outside a module

After updating my PowerBI custom visual with "powerbi-visuals-utils-tooltiputils": "^2.3.1" (following instructions on https://github.com/microsoft/powerbi-visuals-utils-tooltiputils/blob/master/docs/usage/installation-guide.md and https://github.com/microsoft/powerbi-visuals-utils-tooltiputils/blob/master/docs/usage/usage-guide.md), the custom visual won't display any more in the online PowerBI service. The error description that I get in the web developer console in Chrome is the one in the title of this issue.

Here is my package.json file:

{
    "name": "visual",
    "scripts": {
        "pbiviz": "pbiviz",
        "start": "pbiviz start",
        "package": "pbiviz package",
        "lint": "tslint -r \"node_modules/tslint-microsoft-contrib\"  \"+(src|test)/**/*.ts\""
    },
    "dependencies": {
        "@babel/runtime": "^7.4.5",
        "@babel/runtime-corejs2": "^7.4.5",
        "@types/d3": "5.7.2",
        "core-js": "3.1.3",
        "d3": "5.9.7",
        "powerbi-visuals-api": "^2.6.1",
        "powerbi-visuals-utils-dataviewutils": "^2.2.0",
        "powerbi-visuals-utils-tooltiputils": "^2.3.1"
    },
    "devDependencies": {
        "ts-loader": "6.0.4",
        "typescript": "3.5.3"
    }
}

Here is the error stack message taken from the browser's console:

VM89901:14 Uncaught SyntaxError: Cannot use import statement outside a module
    at Object.i [as injectJsCode] (customVisualsHost.bundle.min.js:formatted:14324)
    at r (customVisualsHost.bundle.min.js:formatted:18561)
    at i.loadWithoutResourcePackage (customVisualsHost.bundle.min.js:formatted:18850)
    at i.executeMessage (customVisualsHost.bundle.min.js:formatted:18939)
    at i.onMessageReceived (customVisualsHost.bundle.min.js:formatted:18932)
    at customVisualsHost.bundle.min.js:formatted:18695
    at e.invokeHandler (customVisualsHost.bundle.min.js:formatted:15412)
    at e.dispatchMessage (customVisualsHost.bundle.min.js:formatted:15400)
    at e.onMessageReceived (customVisualsHost.bundle.min.js:formatted:15381)
    at windowMessageHandler (customVisualsHost.bundle.min.js:formatted:15265)

I am suspecting the error has something to do with compilation of my JS with Babel, because when I am coding and running pbiviz start I get no errors whatsoever. I don't think this is a TypeScript error and the module mentioned does not seem to be a TypeScript module, but rather an ES6 module.

I'd love if someone could help me get to the bottom of this. What am I missing here?

If I remove the "powerbi-visuals-utils-tooltiputils" package reference from my project (from package.json) and reinstall all the npm packages, the error disappears. Therefore I conclude there is a JS compatibility issue that I cannot spot in powerbi-visuals-utils-tooltiputils package.

Am I perhaps missing a package in my project that I need to install or update? I am trying to search for TupeScript modules that might be the source of the issue but I am not able to find any. Meaning that there must be an issue with how some code in powerbi-visuals-utils-tooltiputils package is compiling to ES6.

Thank you in advance for any help.

createTooltipServiceWrapper no return

powerbi-visuals-utils-tooltiputils version 2.5.2
this.tooltipServiceWrapper=createTooltipServiceWrapper(options.host.tooltipService, options.element);
createTooltipServiceWrapper no return value .

Missing usage docs

The docs folder is no longer available, but it's still listed in the readme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.