Skip to content

bryan-nice/powerbi-reactjs-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

powerbi-reactjs-app

react-powerbi

Power BI for React JS which provides components and services to enabling developers to easily embed Power BI reports into their applications.

Getting started

Install

npm install --save react-powerbi

Include

import { Report } from 'react-powerbi';

Render component

<Report 
  id={this.state.embedConfig.id}
  embedUrl={this.state.embedConfig.embedUrl}
  accessToken={this.state.embedConfig.accessToken}
  filterPaneEnabled={true}
  navContentPaneEnabled={false}
  onEmbedded={this.onEmbedded}
/>

Example

import React, { Component } from 'react';
import { Report } from 'react-powerbi';

export default class extends Component {
  onEmbedded(embed) {
    console.log(`Report embedded: `, embed, this);
  }

  render() {
    return (
      <div>
        <h1>react-powerbi demo</h1>

        <Report
          id={this.state.embedConfig.id}
          embedUrl={this.state.embedConfig.embedUrl}
          accessToken={this.state.embedConfig.accessToken}
          filterPaneEnabled={true}
          navContentPaneEnabled={false}
          onEmbedded={this.onEmbedded}
        />
      </div>
    );
  }
}

License

This code is open source and anyone is allowed to use, re-purpose, or modify as long as it conforms to the licenses. The code in this repo is allowed to be in any open source commercial software. No private or public entity is allowed to create nor claim intellectual property if any or all of this code is within their systems. For more details see the LICENSE.

Code Origin References:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors