infobox-4.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $(function () {
  2. initCounters();
  3. initCharts();
  4. });
  5. //Widgets count plugin
  6. function initCounters() {
  7. $('.count-to').countTo();
  8. }
  9. //Charts
  10. function initCharts() {
  11. //Chart Bar
  12. $('.chart.chart-bar:not(.reverse)').sparkline(undefined, {
  13. type: 'bar',
  14. barColor: 'rgba(0, 0, 0, 0.15)',
  15. negBarColor: 'rgba(0, 0, 0, 0.15)',
  16. barWidth: '8px',
  17. height: '34px'
  18. });
  19. //Chart Bar Reverse
  20. $('.chart.chart-bar.reverse').sparkline(undefined, {
  21. type: 'bar',
  22. barColor: 'rgba(255, 255, 255, 0.15)',
  23. negBarColor: 'rgba(255, 255, 255, 0.15)',
  24. barWidth: '8px',
  25. height: '34px'
  26. });
  27. //Chart Pie
  28. $('.chart.chart-pie').sparkline(undefined, {
  29. type: 'pie',
  30. height: '50px',
  31. sliceColors: ['rgba(0,0,0,0.10)', 'rgba(0,0,0,0.15)', 'rgba(0,0,0,0.20)', 'rgba(0,0,0,0.25)']
  32. });
  33. //Chart Line
  34. $('.chart.chart-line').sparkline(undefined, {
  35. type: 'line',
  36. width: '60px',
  37. height: '45px',
  38. lineColor: 'rgba(0, 0, 0, 0.15)',
  39. lineWidth: 2,
  40. fillColor: 'rgba(0,0,0,0)',
  41. spotColor: 'rgba(0, 0, 0, 0.15)',
  42. maxSpotColor: 'rgba(0, 0, 0, 0.15)',
  43. minSpotColor: 'rgba(0, 0, 0, 0.15)',
  44. spotRadius: 3,
  45. highlightSpotColor: 'rgba(0, 0, 0, 0.15)'
  46. });
  47. }