Skip to content

This repository contains dashboard extensions that allow you to add the additional functionality to the Web Dashboard.

License

Notifications You must be signed in to change notification settings

ahmeturun/dashboard-extensions

 
 

Repository files navigation

DevExpress Dashboard Extensions

This repository contains dashboard extensions that allow you to add the additional functionality to the Web Dashboard.

The following extensions are available:

  • Funnel D3

    A custom FunnelD3 item renders a funnel chart using the D3Funnel JS library.

  • Online Map

    A custom Online Map item allows you to place callouts on Google or Bing maps using geographical coordinates.

  • Web Page

    A custom Web Page item displays a single web page or a set of pages.

  • Parameter Item

    A custom Parameter item renders dashboard parameter dialog content inside the dashboard layout and allows you to edit and submit parameter values.

  • Simple Table

    A custom Simple Table item renders data from the measure / dimensions as an HTML table.

  • Dashboard Panel

    The Dashboard Panel is an extension that displays a list of available dashboards and lets you switch between the designer and viewer modes.

You can use these extensions as a base for your own dashboard item extension development.

Install a dashboard extension package

You can install the required scripts with npm or download them from the repository:

Install scripts using npm

Open a folder with the Web Dashboard application and run the following command:

npm install git+https://git@github.com/DevExpress/dashboard-extensions.git

Make sure that the devexpress-dashboard package is installed.

Download the latest version of scripts from GitHub

  1. Download the latest version of scripts from GitHub.
  2. Copy the dist folder with scripts to your project with the Web Dashboard application.

Integrate dashboard extensions in the application

You can now integrate the extensions to the Web Dashboard. Use one of the approaches: modular approach or global namespaces approach.

Modular approach

Import the required modules and register extensions in code before the control is rendered:

    import { FunnelD3ItemExtension } from 'dashboard-extensions/dist/funnel-d3-item';
    import { OnlineMapItemExtension } from 'dashboard-extensions/dist/online-map-item';
    import { ParameterItemExtension } from 'dashboard-extensions/dist/parameter-item';
    import { WebPageItemExtension } from 'dashboard-extensions/dist/webpage-item';
    import { SimpleTableItemExtension } from 'dashboard-extensions/dist/simple-table-item';
    // ...
    export class DashboardComponent implements AfterViewInit {
        ngAfterViewInit(): void {
            // ...
            dashboardControl.registerExtension(new OnlineMapItemExtension(dashboardControl));
            dashboardControl.registerExtension(new FunnelD3ItemExtension(dashboardControl));
            dashboardControl.registerExtension(new WebPageItemExtension(dashboardControl));
            dashboardControl.registerExtension(new ParameterItemExtension(dashboardControl));
            dashboardControl.registerExtension(new SimpleTableItemExtension(dashboardControl));
            dashboardControl.render(); 
        }
    }

Note that the Dashboard Panel extension consists of HTML, JavaScript, and CSS files and requires additional steps to integrate into the Web Dashboard. See a Dashboard Panel instruction to learn details.

See Client-Side Configuration (Modular Approach) for more information on how to configure a client part of the Web Dashboard application for a modular approach.

Global namespaces approach

  1. Attach the downloaded scripts to the project inside the <body> section before the end tag onto the page containing Web Dashboard.
<body>
    <!-- ... -->
    <script src="node_modules/d3/dist/d3.min.js"></script>
    <script src="node_modules/d3-funnel/dist/d3-funnel.min.js"></script>
    <script src="node_modules/dashboard-extensions/dist/funnel-d3-item.js"></script>
    <script src="node_modules/dashboard-extensions/dist/online-map-item.js"></script>
    <script src="node_modules/dashboard-extensions/dist/parameter-item.js"></script>
    <script src="node_modules/dashboard-extensions/dist/webpage-item.js"></script>
    <script src="node_modules/dashboard-extensions/dist/simple-table-item.js"></script>
</body>
  1. Register extensions in code before the control is rendered:
    DevExpress.Dashboard.ResourceManager.embedBundledResources();
    var dashboardControl = new DevExpress.Dashboard.DashboardControl(document.getElementById("web-dashboard"), { 
        // ...
    });
    // ...
    dashboardControl.registerExtension(new OnlineMapItemExtension(dashboardControl));
    dashboardControl.registerExtension(new FunnelD3ItemExtension(dashboardControl));
    dashboardControl.registerExtension(new WebPageItemExtension(dashboardControl));
    dashboardControl.registerExtension(new ParameterItemExtension(dashboardControl));
    dashboardControl.registerExtension(new SimpleTableItemExtension(dashboardControl));    

    dashboardControl.render();

Note that the Dashboard Panel extension consists of HTML, JavaScript, and CSS files and requires additional steps to integrate into the Web Dashboard. See a Dashboard Panel instruction to learn details.

See Client-Side Configuration (Global Namespaces) for more information on how to configure a client part of the Web Dashboard application using the approach with global namespaces.

Development

You can use a code of these extensions as a base for your own dashboard item extension development.

  1. Fork your own copy of DevExpress/dashboard-extensions to your account.

  2. Clone this repository to get a local copy of the repository and navigate to the folder.

    git clone https://github.com/{your-GitHub-account-name}/dashboard-extensions.git
    cd dashboard-extensions
  3. Install webpack and webpack-cli globally if required.

    npm install webpack webpack-cli -g
  4. Install npm.

    npm install
  5. Install the devexpress-dashboard package.

    npm install devexpress-dashboard
  6. Edit extension's code in the src folder and save your changes.

  7. Run webpack to bundle script files. See webpack.config.js for build configuration.

    webpack

    As a result, you can find the extension's script files in the repository's dist folder.

License

These extensions are distributed under the MIT license (free and open-source), but can only be used with a commercial DevExpress Dashboard software product. You can review the license terms or download a free trial version of the Dashboard suite at DevExpress.com.

Support & Feedback

About

This repository contains dashboard extensions that allow you to add the additional functionality to the Web Dashboard.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.0%
  • JavaScript 1.4%
  • Other 1.6%