Blame view

backend/makest/js/demo/peity-demo.js 764 Bytes
d1f8bd40   Alexey Boroda   first commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  $(function() {
      $("span.pie").peity("pie", {
          fill: ['#1ab394', '#d7d7d7', '#ffffff']
      })
  
      $(".line").peity("line",{
          fill: '#1ab394',
          stroke:'#169c81',
      })
  
      $(".bar").peity("bar", {
          fill: ["#1ab394", "#d7d7d7"]
      })
  
      $(".bar_dashboard").peity("bar", {
          fill: ["#1ab394", "#d7d7d7"],
          width:100
      })
  
      var updatingChart = $(".updating-chart").peity("line", { fill: '#1ab394',stroke:'#169c81', width: 64 })
  
      setInterval(function() {
          var random = Math.round(Math.random() * 10)
          var values = updatingChart.text().split(",")
          values.shift()
          values.push(random)
  
          updatingChart
              .text(values.join(","))
              .change()
      }, 1000);
  
  });