Socket
Socket
Sign inDemoInstall

angular2-chartjs

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular2-chartjs - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

CHANGELOG.md
# Change Log
## v0.1.5 / 2016-10-24
### Added
- exposed chart instance.
## v0.1.4 / 2016-10-13

@@ -4,0 +8,0 @@ ### Fixed

11

dev/app.component.ts

@@ -1,2 +0,3 @@

import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { ChartComponent } from '../src';

@@ -8,3 +9,5 @@ @Component({

export class AppComponent {
type = 'line'
@ViewChild(ChartComponent) chartComponent: ChartComponent;
type = 'line';
data = {

@@ -18,7 +21,7 @@ labels: ["January", "February", "March", "April", "May", "June", "July"],

]
}
};
options = {
responsive: true,
maintainAspectRatio: false
}
};

@@ -25,0 +28,0 @@ constructor() {

import { ElementRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
export declare class ChartComponent implements OnInit, OnChanges {
private elementRef;
private chart;
chart: any;
type: string;

@@ -6,0 +6,0 @@ data: any;

{
"name": "angular2-chartjs",
"version": "0.1.4",
"version": "0.1.5",
"description": "Chart.js component for Angular2",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -26,3 +26,3 @@ # angular2-chartjs

```JavaScript
type = 'line'
type = 'line';
data = {

@@ -36,7 +36,7 @@ labels: ["January", "February", "March", "April", "May", "June", "July"],

]
}
};
options = {
responsive: true,
maintainAspectRatio: false
}
};
```

@@ -48,2 +48,25 @@ HTML

## Options
### [type]
*string*, required
Chart type.
### [data]
*object*, required
To display data, the chart must be passed a data object that contains all of the information needed by the chart. [See](http://www.chartjs.org/docs/#chart-configuration-chart-data).
### [options]
*object*, optional
To create a chart with configuration options, simply pass an object containing your configuration to the constructor. [See](http://www.chartjs.org/docs/#chart-configuration-creating-a-chart-with-options).
## Members
### chart
*Chart*
Chart instance. You can call Chart.js methods via this member.
Example:
```JavaScript
chartComponent.chart.destroy();
```
## SystemJs

@@ -50,0 +73,0 @@ Add following settings

@@ -9,3 +9,3 @@ import { Component, Input, ElementRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';

export class ChartComponent implements OnInit, OnChanges {
private chart: any;
chart: any;

@@ -12,0 +12,0 @@ @Input() type: string;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc