Last active
April 1, 2018 16:28
-
-
Save arn-ob/a38fd29fd684b61b178a485cdb70e03d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component } from '@angular/core'; | |
| @Component({ | |
| selector: 'app-root', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.css'] | |
| }) | |
| export class AppComponent { | |
| type; | |
| data_list = [65, 59, 80, 81, 56, 55, 40]; | |
| data; | |
| options; | |
| ngOnInit() { | |
| this.chart_create_function(); | |
| } | |
| chart_create_function() { | |
| this.type = 'line'; | |
| this.data = { | |
| labels : this.data_list, | |
| datasets: [ | |
| { | |
| data: this.data_list | |
| } | |
| ] | |
| }; | |
| this.options = { | |
| responsive: true, | |
| maintainAspectRatio: false | |
| }; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment