# line-health

> A responsive machine dashboard which compares the machine with a line of machines.

Latest version **0.3.0** (published 2019-03-25) · 0 weekly downloads

## Install

```sh
npm install line-health
pnpm add line-health
yarn add line-health
bun add line-health
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.0 |
| Published | 2019-03-25 |
| First published | 2019-03-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 477.5 KB |
| Known vulnerabilities | 0 (+24 in 4 direct dependencies) |
| Install scripts | no |
| Author | Ralph Göllner |
| Maintainers | bullorosso |

## Links

- npm: https://www.npmjs.com/package/line-health
- Repository: https://github.com/BulloRosso/line-health
- Issues: https://github.com/BulloRosso/line-health/issues
- npm.io page: https://npm.io/package/line-health

## Dependencies (16)

- [rxjs](https://npm.io/package/rxjs.md) ~6.3.3
- [tslib](https://npm.io/package/tslib.md) ^1.9.0
- [core-js](https://npm.io/package/core-js.md) ^2.5.4
- [zone.js](https://npm.io/package/zone.js.md) ~0.8.26
- [@angular/cdk](https://npm.io/package/@angular/cdk.md) ^7.3.5
- [@angular/core](https://npm.io/package/@angular/core.md) ~7.2.0
- [@angular/forms](https://npm.io/package/@angular/forms.md) ~7.2.0
- [d3-ng2-service](https://npm.io/package/d3-ng2-service.md) ^2.2.0
- [@angular/common](https://npm.io/package/@angular/common.md) ~7.2.0
- [@angular/router](https://npm.io/package/@angular/router.md) ~7.2.0
- [@angular/compiler](https://npm.io/package/@angular/compiler.md) ~7.2.0
- [@angular/animations](https://npm.io/package/@angular/animations.md) ~7.2.0
- [@angular/flex-layout](https://npm.io/package/@angular/flex-layout.md) ^7.0.0-beta.24
- [@mdi/angular-material](https://npm.io/package/@mdi/angular-material.md) ^3.5.95
- [@angular/platform-browser](https://npm.io/package/@angular/platform-browser.md) ~7.2.0
- [@angular/platform-browser-dynamic](https://npm.io/package/@angular/platform-browser-dynamic.md) ~7.2.0

## Recent versions

- 0.3.0 (latest) — 2019-03-25
- 0.2.0 — 2019-03-25

## README

# LineHealth

Renders a machine availability comparison in a responsive way.

![Desktop](https://github.com/BulloRosso/line-health/blob/master/component-desktop.PNG?raw=true)

![Mobile](https://github.com/BulloRosso/line-health/blob/master/component-mobile.PNG?raw=true)

## Parameters

| Parameter Name    | Type     | Comment          |
|-------------------|----------|------------------|
 allMachines | Array<Machine>  | See type machine 
 donutPercentValue | number | Percent value in donut
 labelMap | Map<string,string> | Translations
 todaysMachineAvailablity | Array | { label: 'green', count: 13 }
 highlightColor | string | used on the first machine line

The comparison needs machines with the following properties:

| Parameter Name    | Type     | Comment          |
|-------------------|----------|------------------|
 name | string | Machine manufacturer and make
 status | string | RGB hex value or color name
 imageUrl | string | machine image for first column
 largeImageUrl | string | machine image large (only for first machine)
 availabilityArr | Array<string> | an array of RGB hex values or color names (exactly 24 values - one per hour)

## Tranlsations

You have to provide a string map containing the translated UI labels:

```javascript
    // translations
    this.labelMap.set("lbl.availToday",   "Today's availability");
    this.labelMap.set("lbl.24hours",      "24 hour avaiablility");
    this.labelMap.set("lbl.producing",    "Producing");
    this.labelMap.set("lbl.idle",         "Idle");
    this.labelMap.set("lbl.unavailable",  "Unavailable");
    this.labelMap.set("lbl.noData",       "No data");
    this.labelMap.set("lbl.status",       "Status");
```

## Optional parameters

A machine can have a largeImageUrl which is rendered below the pie chart.

## Dependencies
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.6.

Angular Material, d3.v4, Angular flex-layout

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

---
_Source: https://npm.io/package/line-health · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
