Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. Chart.defaults.global.responsive = true;
  2.  
  3. // HARDCODED DATAS
  4. obj.data = {};
  5. obj.data.pie = [{
  6. value : 10,
  7. color : "#F38630",
  8. label : '#abbonamenti',
  9. labelColor : 'white',
  10. labelFontSize : '16'
  11. },
  12. {
  13. value : 50,
  14. color : "#F34353",
  15. label : '#autobusSporco',
  16. labelColor : 'white',
  17. labelFontSize : '16'
  18. },
  19. {
  20. value : 10,
  21. color : "#4578aa",
  22. label : '#ritardo',
  23. labelColor : 'white',
  24. labelFontSize : '16'
  25. },
  26. {
  27. value : 10,
  28. color : "#668812",
  29. label : '#sciopero',
  30. labelColor : 'white',
  31. labelFontSize : '16'
  32. },
  33. {
  34. value : 20,
  35. color : "#C2DD04",
  36. label : '#deviazione',
  37. labelColor : 'white',
  38. labelFontSize : '16'
  39. },];
  40.  
  41. obj.data.pie2 = [{
  42. value : 30,
  43. color : "#F38630",
  44. label : '#abbonamenti',
  45. labelColor : 'white',
  46. labelFontSize : '16'
  47. },
  48. {
  49. value : 20,
  50. color : "#F34353",
  51. label : '#autobusSporco',
  52. labelColor : 'white',
  53. labelFontSize : '16'
  54. },
  55. {
  56. value : 20,
  57. color : "#4578aa",
  58. label : '#ritardo',
  59. labelColor : 'white',
  60. labelFontSize : '16'
  61. },
  62. {
  63. value : 10,
  64. color : "#668812",
  65. label : '#sciopero',
  66. labelColor : 'white',
  67. labelFontSize : '16'
  68. },
  69. {
  70. value : 20,
  71. color : "#C2DD04",
  72. label : '#deviazione',
  73. labelColor : 'white',
  74. labelFontSize : '16'
  75. },];
  76.  
  77. obj.data.details = {
  78. labels: ["06:00 - 10:00", "11:00 - 14:00", "15:00 - 18:00", "19:00 - 22:00", "22:00 - 05:00", "test - test"],
  79. datasets: [
  80. {
  81. label: "My First dataset",
  82. fillColor: "rgba(120,220,220,0.2)",
  83. strokeColor: "rgba(120,220,220,1)",
  84. pointColor: "rgba(120,220,220,1)",
  85. pointStrokeColor: "#ff6699",
  86. pointHighlightFill: "#ff6699",
  87. pointHighlightStroke: "rgba(220,220,220,1)",
  88. data: [165, 159, 25, 10, 20, 120]
  89. },
  90. {
  91. label: "My second dataset",
  92. fillColor: "rgba(220,120,220,0.2)",
  93. strokeColor: "rgba(220,120,220,1)",
  94. pointColor: "rgba(220,120,220,1)",
  95. pointStrokeColor: "#fff",
  96. pointHighlightFill: "#fff",
  97. pointHighlightStroke: "rgba(220,220,220,1)",
  98. data: [195, 159, 10, 0, 30, 20]
  99. },
  100. ]
  101. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement