Code Monkey home page Code Monkey logo

dashboard-extensions's Introduction

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.

  • Polar Chart Item

    A custom Polar Chart item renders a polar chart using the dxPolarChart DevExtreme widget.

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://[email protected]/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';
    import { PolarChartItemExtension } from 'dashboard-extensions/dist/polar-chart-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.registerExtension(new PolarChartItemExtension(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>
    <script src="node_modules/dashboard-extensions/dist/polar-chart-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.registerExtension(new PolarChartItemExtension(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 devextreme, @devexpress/analytics-core and devexpress-dashboard packages.

    npm install devextreme @devexpress/analytics-core 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

dashboard-extensions's People

Contributors

dimarudnev avatar sergey-kanaev avatar alexanderkovalenko avatar natakazakova avatar wslark avatar oldshaterhan avatar

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.