Skip to content

The repository contains the source code of the scripts created in the step-by-step Web Dashboard's Custom Item tutorials.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/dashboard-react-app-custom-item-tutorials

Repository files navigation

Dashboard for React - Custom Item Tutorials

The example contains the source code of the scripts created in the step-by-step Custom Item tutorials.

This example uses a client-server architecture. The server (backend) project communicates with the client (frontend) application and includes all the necessary styles, scripts and HTML templates. Note that the script version on the client must match the version of libraries on the server.

Files to Review

Static Custom Item

View Tutorial: Create a Static Custom Item

View Script: HelloWorldItem.js

The script contains a HelloWorld static custom item with a custom property that allows you to change the static text.

Data-Aware Custom Item

View Tutorial: Create a Data-Aware Custom Item

View Script: DataAwareItem.js

This script contains a data-aware custom item that displays formatted dimension values and allows users to color these values.

Data-Aware Item based on External Visualization Widget

View Tutorial: Create a Data-Aware Item based on an External Visualization Widget

View Script: FunnelChartItem.js

This script contains a more "real-world" custom item that uses an external visualization widget. In this example, it is the dxFunnel widget that can show values across multiple stages in a process. This widget supports data binding, master filtering, and coloring.

Quick Start

Server

In the asp-net-core-server folder, run the following command:

dotnet run

The server starts at http://localhost:5000 and the client gets data from http://localhost:5000/api/dashboard. To debug the server, run the asp-net-core-server application in Visual Studio and change the client's endpoint property according to the listening port: https://localhost:44367/api/dashboard.

See the following section for information on how to install NuGet packages from the DevExpress NuGet feed: Install DevExpress Controls Using NuGet Packages.

This server allows CORS requests from all origins with any scheme (http or https). This default configuration is insecure: any website can make cross-origin requests to the app. We recommend that you specify the client application's URL to prohibit other clients from accessing sensitive information stored on the server. Learn more: Cross-Origin Resource Sharing (CORS)

Client

In the dashboard-react-app folder, run the following commands:

npm install
npm start

Open http://localhost:3000/ in your browser to see the result.

Documentation

More Examples

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

The repository contains the source code of the scripts created in the step-by-step Web Dashboard's Custom Item tutorials.

Topics

Resources

License

Stars

Watchers

Forks