Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.79 KB | None | 0 0
  1. Pie Charts Display
  2. const privProgConfig = {
  3. chart: {
  4. type: 'pie',
  5. plotBackgroundColor: null,
  6. plotBorderWidth: null,
  7. plotShadow: false,
  8. },
  9. title: {
  10. text: 'Privacy Program Engagement',
  11. },
  12. tooltip: {
  13. pointFormat: 'Percentage: <b>{point.percentage:.1f}%</b><br/>',
  14. },
  15. plotOptions: {
  16. pie: {
  17. allowPointSelect: true,
  18. cursor: 'pointer',
  19. dataLabels: {
  20. enabled: false,
  21. },
  22. showInLegend: true,
  23. },
  24. },
  25. series: [{
  26. data: [
  27. {
  28. name: 'Not Completed',
  29. y: 1 - (0.01 * privProgInt),
  30. },
  31. {
  32. name: 'Completed',
  33. y: (0.01 * privProgInt),
  34. }],
  35. }],
  36. colors: Theme.palette.completionColors,
  37. };
  38.  
  39. const dataProConfig = {
  40. chart: {
  41. type: 'pie',
  42. plotBackgroundColor: null,
  43. plotBorderWidth: null,
  44. plotShadow: false,
  45. },
  46. title: {
  47. text: 'Data Protection Measures',
  48. },
  49. tooltip: {
  50. pointFormat: 'Percentage: <b>{point.percentage:.1f}%</b><br/>',
  51. },
  52. plotOptions: {
  53. pie: {
  54. allowPointSelect: true,
  55. cursor: 'pointer',
  56. dataLabels: {
  57. enabled: false,
  58. },
  59. showInLegend: true,
  60. },
  61. },
  62. series: [{
  63. data: [
  64. {
  65. name: 'Not Completed',
  66. y: 1 - (0.01 * dataProInt),
  67. },
  68. {
  69. name: 'Completed',
  70. y: (0.01 * dataProInt),
  71. }],
  72. }],
  73. colors: Theme.palette.completionColors,
  74. };
  75.  
  76. const dataMinConfig = {
  77. chart: {
  78. type: 'pie',
  79. plotBackgroundColor: null,
  80. plotBorderWidth: null,
  81. plotShadow: false,
  82. },
  83. title: {
  84. text: 'Data Minimization',
  85. },
  86. tooltip: {
  87. pointFormat: 'Percentage: <b>{point.percentage:.1f}%</b><br/>',
  88. },
  89. plotOptions: {
  90. pie: {
  91. allowPointSelect: true,
  92. cursor: 'pointer',
  93. dataLabels: {
  94. enabled: false,
  95. },
  96. showInLegend: true,
  97. },
  98. },
  99. series: [{
  100. data: [
  101. {
  102. name: 'Not Completed',
  103. y: 1 - (0.01 * dataMinInt),
  104. },
  105. {
  106. name: 'Completed',
  107. y: (0.01 * dataMinInt),
  108. }],
  109. }],
  110. colors: Theme.palette.completionColors,
  111. };
  112.  
  113. const transConfig = {
  114. chart: {
  115. type: 'pie',
  116. plotBackgroundColor: null,
  117. plotBorderWidth: null,
  118. plotShadow: false,
  119. },
  120. title: {
  121. text: 'Transparency & Choice',
  122. },
  123. tooltip: {
  124. pointFormat: 'Percentage: <b>{point.percentage:.1f}%</b><br/>',
  125. },
  126. plotOptions: {
  127. pie: {
  128. allowPointSelect: true,
  129. borderWidth: 0,
  130. cursor: 'pointer',
  131. dataLabels: {
  132. enabled: false,
  133. },
  134. showInLegend: true,
  135. },
  136. },
  137. series: [{
  138. data: [
  139. {
  140. name: 'Not Completed',
  141. y: 1 - (0.01 * transInt),
  142. },
  143. {
  144. name: 'Completed',
  145. y: (0.01 * transInt),
  146. }],
  147. }],
  148. colors: Theme.palette.completionColors,
  149. };
  150.  
  151. const thirdPartyConfig = {
  152. chart: {
  153. type: 'pie',
  154. plotBackgroundColor: null,
  155. plotBorderWidth: null,
  156. plotShadow: false,
  157. },
  158. title: {
  159. text: 'Update Third Party Vendor Inventory & Usage',
  160. },
  161. tooltip: {
  162. pointFormat: 'Percentage: <b>{point.percentage:.1f}%</b><br/>',
  163. },
  164. plotOptions: {
  165. pie: {
  166. allowPointSelect: true,
  167. cursor: 'pointer',
  168. dataLabels: {
  169. enabled: false,
  170. },
  171. showInLegend: true,
  172. },
  173. },
  174. series: [{
  175. data: [
  176. {
  177. name: 'Not Completed',
  178. y: 1 - (0.01 * thirdPartyInt),
  179. },
  180. {
  181. name: 'Completed',
  182. y: (0.01 * thirdPartyInt),
  183. }],
  184. }],
  185. colors: Theme.palette.completionColors,
  186. };
  187.  
  188. Large bar chart display
  189. const config = {
  190. chart: {
  191. type: 'bar',
  192. plotBackgroundColor: null,
  193. plotBorderWidth: null,
  194. plotShadow: false,
  195. zIndex: 0,
  196. },
  197. title: {
  198. text: 'Compliance Breakdown',
  199. align: 'center',
  200. },
  201. xAxis: {
  202. categories: ['Privacy Program Engagement', 'Data Protection Measures',
  203. 'Data Minimization', 'Transparency & Choice', 'Update 3rd Party Vendors'],
  204. labels: {
  205. enabled: true,
  206. },
  207. },
  208. yAxis: {
  209. allowDecimals: false,
  210. title: {
  211. text: null,
  212. },
  213. min: 0,
  214. max: 100,
  215. },
  216. plotOptions: {
  217. series: {
  218. stacking: 'normal',
  219. },
  220. },
  221. tooltip: {
  222. shared: false,
  223. formatter() {
  224. return this.point.printout;
  225. },
  226. },
  227. series: [{
  228. name: 'Incomplete',
  229. data: [
  230. {
  231. y: 100 - privProgAvg,
  232. printout: privProgFailure.join('<br>'),
  233. },
  234. {
  235. y: 100 - dataProtAvg,
  236. printout: dataProtFailure.join('<br>'),
  237. },
  238. {
  239. y: 100 - dataMinAvg,
  240. printout: dataMinFailure.join('<br>'),
  241. },
  242. {
  243. y: 100 - transAvg,
  244. printout: transStr2,
  245. },
  246. {
  247. y: 100 - thirdPartyAvg,
  248. printout: thirdPartyStr2,
  249. },
  250. ],
  251. color: Theme.palette.completionColors[0],
  252. },
  253. {
  254. name: 'Complete',
  255. data: [
  256. {
  257. y: privProgAvg,
  258. printout: privProgSuccess.join('<br>'),
  259. },
  260. {
  261. y: dataProtAvg,
  262. printout: dataProtSuccess.join('<br>'),
  263. },
  264. {
  265. y: dataMinAvg,
  266. printout: dataMinSuccess.join('<br>'),
  267. },
  268. {
  269. y: transAvg,
  270. printout: transStr1,
  271. },
  272. {
  273. y: thirdPartyAvg,
  274. printout: thirdPartyStr1,
  275. },
  276. ],
  277. color: Theme.palette.completionColors[1],
  278. }],
  279. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement