0.0.1 • Published 4 years ago

ng2-charts-boundary-lines v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

ng2-charts-boundary-lines

Chart and edit boundary lines for Angular based on Chart.js (with zoom plugin and dragdata plugin ) and ng2-charts.

npm.io

  • Charts measurements and boundary lines as time series
  • Filters time series
    • Filters x-values by a certain amount of maximum ticks
    • Aggregates data in between ticks according to different strategies (e.g., show maximum value in between ticks)
  • Change boundary lines
    • Drag data points of boundary lines to change them
    • Instantly emits changed values
    • Interpolates data between ticks linearly
  • Zoom and pan
    • Zoom and pan using your mouse or finger
    • Filters data by start and end time on the x-axis to only render necessary data

Usage

Installation

  1. You can install ng2-charts-boundary-lines using npm

    npm install ng2-charts-boundary-lines --save
  2. You need to install Chart.js, ng2-charts`, and some plugins in your application as they are peer dependencies

    npm install chart.js --save
    npm install chartjs-plugin-annotation --save
    npm install chartjs-plugin-dragdata --save
    npm install chartjs-plugin-zoom --save
    npm install hammerjs --save
    npm install help --save
    npm install ng2-charts --save

Integration

import { Ng2ChartsBoundaryLinesModule } from 'ng2-charts-boundary-lines';

// In your app's module:
imports: [
   Ng2ChartsBoundaryLinesModule
]

Usage

<ng2-charts-boundary-lines
  [traces]="traces"              
  [(lowerBaseline)]="lowerBaseline"
  [(upperBaseline)]="upperBaseline"
  [maxDataPoints]="48"           
  [width]=1000                   
  [height]=800>                  
</ng2-charts-boundary-lines>

Input values

NameTypeDescriptionRequiredDefault
tracesChartPoint[]Actual measuementsYesundefined
lowerBaselineChartPoint[]Lower boundariesYesundefined
upperBaselineChartPoint[]Upper boundariesYesundefined
maxDataPointsnumberAmount of ticksNo48
widthnumberWidth of chartNoundefined
heightnumberHeight of chartNoundefined

Output values

NameTypeDescription
lowerBaselineChangeChartPoint[]Adapted lower boundaries
upperBaselineChangeChartPoint[]Adapted upper boundaries

Troubleshooting

Please use GitHub Issues to report bugs and feature requests.

Thank you!

License

The MIT License (see the LICENSE file for the full text)