🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

node-red-contrib-ui-timeline

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-ui-timeline

Timeline UI widget node for Node-RED Dashboard

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

node-red-contrib-ui-timeline

A Node-RED-Dashboard UI widget node that displays timeline. Google-like timeline chart based on Chart.js.

Install

Either use the Editor - Menu - Manage Palette - Install option, or run the following command in your Node-RED user directory (typically ~/.node-red) after installing Node-RED-dashboard.

    npm i node-red-contrib-ui-timeline
    npm i https://github.com/PO-CES-EDGE/node-red-contrib-ui-timeline

Usage

This timeline node expects msg.payload to contain an array of array of timeline data, one object per row. Each data row object should have the same set of values:

  • Label
  • Start date timestamp
  • End date timestamp

Example data

[
  [
    "Start Extruders",
    1619861576130,
    1619866976130
  ],
  [
    "Raise to starting speeds",
    1619866976130,
    1619868476130
  ],
  [
    "Raise to starting speeds",
    1619868476130,
    1619870276130
  ],

  [
    "Stop",
    1619900816130,
    1619902076130
  ]
]

Outputs

(No output)

advanced features

Validation

Input data into message payload must be an array of array of 3 items [[String, date timestamp, date timestamp], ....] Example of JavaScript validation with Joi:

const dataSchema =  Joi.array().items(stepSchema).required();
const stepSchema = Joi.array().length(3).items(Joi.string().required(), Joi.date().timestamp().required(), Joi.date().timestamp().required());

Configuration

The configuration is used to change how the timeline behaves. There are properties to control styling, fonts, the legend, etc.

Configuration keyDescription
Display labelDisplay label of each element
Enable responsiveEnable responsive design: Resizes the chart canvas when its container does.
Text paddingLabel padding space
Y-axis configuration
Background colorsChoose two colors for y-axis grid background color
Repeat two colorsRepeat two background colors on y-axis grid.
Elements or steps background color configuration
Palette 1Choose palette 1 colors
Palette 2Choose palette 2 colors

Keywords

node-red

FAQs

Package last updated on 15 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts