Advertisement
Guest User

Untitled

a guest
Jan 29th, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. $(function ()
  2. {
  3. $("#chartContainer").dxRangeSelector({
  4. margin: {
  5. top: 0
  6. },
  7. scale: {
  8. minorTickInterval: "day",
  9. majorTickInterval: {
  10. days: 7
  11. }
  12. },
  13. size: {
  14. height: 200
  15. },
  16. dataSource: [
  17. { t: new Date(2011, 11, 22), views: 19, uniques: 18 },
  18. { t: new Date(2011, 11, 29), views: 27, uniques: 12 },
  19. { t: new Date(2012, 0, 5), views: 30, uniques: 5 },
  20. { t: new Date(2012, 0, 12), views: 26, uniques: 6 },
  21. { t: new Date(2012, 0, 19), views: 18, uniques: 10 },
  22. { t: new Date(2012, 0, 26), views: 15, uniques: 15 },
  23. { t: new Date(2012, 1, 2), views: 14, uniques: 21 },
  24. { t: new Date(2012, 1, 9), views: 14, uniques: 25 }
  25. ],
  26. chart: {
  27. commonSeriesSettings: {
  28. argumentField: 't', opacity:1
  29. },
  30. series: [
  31. { argumentField: "t", valueField: "views", color: '#50cedd' },
  32. { argumentField: "t", valueField: "uniques", color: '#a9e4e8' }
  33. ],
  34. valueAxis: {
  35. min: 0
  36. }
  37. },
  38. selectedRange: {
  39. startValue: new Date(2011, 11, 1),
  40. endValue: new Date(2012, 0, 1)
  41. }
  42. });
  43.  
  44. }
  45.  
  46. );
  47.  
  48. /** Donut **/
  49. $(function ()
  50. {
  51. var dataSource = [
  52. { country: "USA", medals: 110 },
  53. { country: "China", medals: 100 },
  54. { country: "Russia", medals: 72 },
  55. { country: "Britain", medals: 47 },
  56. { country: "Australia", medals: 46 },
  57. { country: "Germany", medals: 41 },
  58. { country: "France", medals: 40 },
  59. { country: "South Korea", medals: 31 }
  60. ];
  61.  
  62. $("#chartContainer2").dxPieChart({
  63. dataSource: dataSource,
  64. legend: {
  65. horizontalAlignment: "right",
  66. verticalAlignment: "top",
  67. margin: 0
  68. },
  69. pointClick: function(point) {
  70. point.select();
  71. },
  72. series: [{
  73. type: "doughnut",
  74. argumentField: "country",
  75. valueField: "medals",
  76. hoverStyle: {
  77. color: "#50cedd"
  78. }
  79. }]
  80. });
  81. }
  82.  
  83. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement