Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. @if (ViewBag.UsersRole == true)
  2. {
  3. <script>
  4. google.charts.load('current', { 'packages': ['bar'] });
  5. google.charts.setOnLoadCallback(drawChart);
  6. var roles = [['Category', 'Budgeted', 'Expensed']];
  7.  
  8. function addPriority(Name, Budgeted, Balance){
  9. Cate.push([Name, Budgeted, Balance]);
  10. };
  11.  
  12.  
  13. function drawChart() {
  14. var data = google.visualization.arrayToDataTable([
  15. ['Name', 'Amount', { role: 'style' }],
  16. ['Admin', @ViewBag.AdminCount, '#e60000'], // RGB value
  17. ['Project Manager', @ViewBag.PMCount, 'color : #ffff00'], // English color name
  18. ['Developer', @ViewBag.DevCount, 'color : #53ff1a'],
  19. ['Submitter', @ViewBag.SubCount, 'color : #0066ff' ], // CSS-style declaration
  20. ]);
  21. var options = {
  22. width: '100%',
  23. height: '100%',
  24. bar: {groupWidth: "95%"},
  25. legend: { position: "none"},
  26. colors: ['#4CD45E']
  27.  
  28. };
  29.  
  30. var chart = new google.charts.Bar(document.getElementById('chart_div'));
  31.  
  32. chart.draw(data, google.charts.Bar.convertOptions(options));
  33. }
  34. </script>
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement