Skip to content

Commit

Permalink
Merge pull request #173 from jmg2107/master
Browse files Browse the repository at this point in the history
(fix) Resize the graph
  • Loading branch information
evenkeeler authored Aug 25, 2016
2 parents 5caa97a + 89e2840 commit e804564
Showing 1 changed file with 8 additions and 22 deletions.
30 changes: 8 additions & 22 deletions src/app/ui/line-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { CORE_DIRECTIVES,
styles: [ `
.chart {display: block;
width: 800px;
height: 600px;}
height: 500px;}
`],
template: `
<base-chart class="chart"
Expand All @@ -30,9 +30,13 @@ import { CORE_DIRECTIVES,

export class LineGraph {
options = {animation: false,
responsive: false,
responsive: true,
maintainAspectRatio: false,
title: {
fullWidth: true
fullWidth: true,
display: true,
text: 'Our Moods',
fontSize: 16
}};
line = "line";
msgs = [];
Expand All @@ -52,22 +56,6 @@ export class LineGraph {
}] };
labels = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];

colors = [{ // grey
backgroundColor: 'rgba(148,159,177,0.2)',
borderColor: 'rgba(148,159,177,1)',
pointBackgroundColor: 'rgba(148,159,177,1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(148,159,177,0.8)'
},
{ // dark grey
backgroundColor: 'rgba(77,83,96,0.2)',
borderColor: 'rgba(77,83,96,1)',
pointBackgroundColor: 'rgba(77,83,96,1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(77,83,96,1)'
}];
legend = true;

constructor() {
Expand All @@ -85,9 +73,7 @@ export class LineGraph {
// position: 'bottom'
// }
// };
// var ctx: any = el.nativeElement.getContext("line");
// var Graph = new Chart(ctx);
// Graph.Line(this.data, this.options);

};

// selectData(event) {
Expand Down

0 comments on commit e804564

Please sign in to comment.