Guest User

Untitled

a guest
Oct 19th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. public lineChartData:Array<any> = [
  2. {data: [79, 22, 87, 12], label:'Series A'}
  3. ];
  4. public lineChartLabels:Array<any> = ['January', 'February', 'March', 'April'];
  5. public lineChartOptions:any = {
  6. responsive: true,
  7. scales: {
  8. yAxes: [{
  9. ticks: {
  10. beginAtZero: true
  11. }
  12. }]
  13. },
  14. annotation: {
  15. drawTime: 'beforeDatasetsDraw',
  16. annotations: [{
  17. type: 'box',
  18. id: 'a-box-1',
  19. yScaleID: 'y-axis-0',
  20. yMin: 0,
  21. yMax: 30,
  22. backgroundColor: '#f7d7db'
  23. }, {
  24. type: 'box',
  25. id: 'a-box-2',
  26. yScaleID: 'y-axis-0',
  27. yMin: 30,
  28. yMax: 70,
  29. backgroundColor: '#FFECD1'
  30. }, {
  31. type: 'box',
  32. id: 'a-box-3',
  33. yScaleID: 'y-axis-0',
  34. yMin: 70,
  35. yMax: 100,
  36. backgroundColor: '#e6f5f0'
  37. }]}
  38. };
  39. public lineChartColors:Array<any> = [
  40. { // grey
  41. backgroundColor: 'rgba(148,159,177,0.2)',
  42. borderColor: 'rgba(148,159,177,1)',
  43. pointBackgroundColor: 'rgba(148,159,177,1)',
  44. pointBorderColor: '#fff',
  45. pointHoverBackgroundColor: '#fff',
  46. pointHoverBorderColor: 'rgba(148,159,177,0.8)'
  47. }
  48. ];
  49. public lineChartLegend:boolean = false;
  50. public lineChartType:string = 'line';
  51.  
  52. this.accountService.getLast90DaysAccountHistory(this.currentUrl.request).subscribe(data => {
  53. if(!data){
  54. this.message = "No history for this account";
  55. }
  56. else{
  57. this.history = data;
  58. }
  59. });
  60.  
  61. {"last90Days":[1000,329.23,399.45,290.3,450.3,240.2,409.54,219.3,537.3,490.3]}
Add Comment
Please, Sign In to add comment