Skip to content

Data Visualization ​

Page Guide ​

Use CasesSuitable for building large-screen displays, business monitoring, risk warning, and multi-data-source visual analysis pages.
PrerequisitesThe visualization platform runtime environment, backend API address, data sources, and display metrics are prepared.
Operation PathCreate a project → drag components → configure data sources → save and preview → publish the access URL.
Acceptance CriteriaThe page is accessible, component data refreshes normally, and the published URL can be integrated and accessed through menus or external links.

Data visualization is a low-code data analysis and dashboard service. It provides reusable visual components and secondary-development capabilities, helping developers turn complex data into charts and dashboards through graphical editing and interactive operations.

It is suitable for smart city, smart park, security monitoring, business operations, risk warning, and other large-screen visualization scenarios.

Product Features ​

  • Rich visualization and industry components.
  • Custom component integration.
  • Built-in examples for quick dashboard creation.
  • Multiple data-source support.
  • Drag-and-drop editing without code.
Product Features

Technical Characteristics ​

  • fastbee-view is an efficient low-code drag-and-drop visualization platform.
  • Charts and page elements are encapsulated as base components.
  • Typical scenarios include exhibitions, business monitoring, risk warning, and operation dashboards.
  • Technology stack: Vue3, TypeScript 4, Vite 2, Naive UI, ECharts 5, Axios, Pinia 2, and PlopJS.
  • Basic workflow: create project -> rename project -> drag components -> save -> preview -> publish.

Run And Deploy ​

Configure backend API address in .env.development:

js
VITE_DEV_PATH = 'http://localhost:8080'

Install dependencies. pnpm is recommended, and Node.js around 16.14.x is preferred.

shell
npm install -g pnpm
pnpm install

Start the development service:

shell
pnpm dev

Build the project:

shell
pnpm run build

For Nginx deployment, upload the built files to /var/data/nginx/view/ and add a location rule:

nginx
location ^~/view/ {
  alias /var/data/nginx/view/;
  index index.html;
  try_files $uri $uri/ /index.html last;
}

Access address:

text
https://[domain]/view/

You can also add an external-link menu in the system, for example:

text
https://iot.fastbee.cn/view/#/project/items

API Reference ​

APIMethodDescription
/goview/project/listGETProject list
/goview/projectPOSTCreate project
/goview/project/save/dataPOSTSave project content
/goview/project/PUTUpdate basic information or publish status
/goview/project/{ids}DELETEDelete project
/goview/project/uploadPOSTUpload file
/goview/project/getDataGETGet project data for preview

Add Menu Entries ​

提示

The commercial edition contains both built-in large screens and the visualization platform. They can be accessed by adding external-link menus.

Fixed large-screen menu example:

text
Enterprise Management -> Menu Management -> Add
Parent menu: Data Visualization
Menu type: Menu
Menu icon: monitor
Menu name: Large Screen
External link: Yes
Route: https://iot.fastbee.cn/bigScreen
Status: Visible / Normal

Visualization platform menu example:

text
Enterprise Management -> Menu Management -> Add
Parent menu: Data Visualization
Menu type: Menu
Menu icon: monitor
Menu name: Visualization Platform
External link: Yes
Route: https://iot.fastbee.cn/view
Status: Visible / Normal

Notes ​

  • Use Node.js 16.14.x or later.
  • If npm install fails, use pnpm.
  • If nrm ls reports an open package error, install the compatible package version:
shell
npm i nrm -g open@8.4.2 --save
nrm ls
NotesNotes
  • If Node.js memory is insufficient during build, increase the heap size:
shell
export NODE_OPTIONS="--max-old-space-size=8192"

Acceptance Checklist ​

ItemExpected Result
Project listCreate, edit, delete, and publish states work correctly.
Data requestDynamic APIs return data, with a default display on failure.
Component adaptationThe screen is not overlapped or distorted at the target resolution.
Publish addressThe published URL is accessible and becomes inaccessible after unpublishing.
Menu integrationThe system menu external link can open the screen.
Auto refreshThe refresh frequency meets business needs without overloading APIs.
Permission controlUnauthorized users cannot enter management and editing pages.
Build and deploymentThe /view/ path and Nginx configuration are correct.

FAQ ​

Screen is blank after publishing ​

Check the Nginx location configuration, deployment directory, frontend resource paths, the browser console for resource 404 errors, and API addresses.

Dynamic requests blocked by CORS ​

Check the frontend proxy, backend CORS settings, Nginx forwarding, and whether the HTTP/HTTPS protocols are consistent.

Data format mismatch ​

Check the data structure required by the component, and use filters to convert API responses into the array, object, or key-value format the component needs.

Page lag ​

Reduce the refresh frequency, reduce simultaneously playing videos and high-frequency charts, compress images, and avoid stacking too many components on a single page.

Development Entry ​

TypePath Or APIDescription
Visualization pagevue3/src/views/visualBigScreenScreen management, preferences, and project entry.
Fixed screenvue3/src/views/fixedBigScreenFixed screen components and pages.
Drag editorvue3/src/views/dragEditorComponent drag-and-drop and editing capabilities.
Project API/goview/projectProject list, create, save, and publish.
Project data/goview/projectDataData execution and project data.
Upload API/goview/project/uploadImage and asset upload.

FastBee | fastbee.cn