definicao de layout
This commit is contained in:
51
public/assets/js/chart/peity-chart/peity-custom.js
Normal file
51
public/assets/js/chart/peity-chart/peity-custom.js
Normal file
@@ -0,0 +1,51 @@
|
||||
var updatingChart = $(".updating-chart").peity("line")
|
||||
|
||||
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)
|
||||
|
||||
$(".line").peity("line")
|
||||
|
||||
$(".bar").peity("bar")
|
||||
|
||||
$('.donut').peity('donut')
|
||||
|
||||
$(".data-attributes span").peity("donut")
|
||||
|
||||
$("span.pie").peity("pie")
|
||||
|
||||
$(".bar-colours-1").peity("bar", {
|
||||
fill: [vihoAdminConfig.primary, vihoAdminConfig.secondary, "#222222"],
|
||||
width: '100',
|
||||
height: '82'
|
||||
})
|
||||
|
||||
$(".bar-colours-2").peity("bar", {
|
||||
fill: function(value) {
|
||||
return value > 0 ? vihoAdminConfig.primary : vihoAdminConfig.secondary
|
||||
},
|
||||
width: '100',
|
||||
height: '82'
|
||||
})
|
||||
|
||||
$(".bar-colours-3").peity("bar", {
|
||||
fill: function(_, i, all) {
|
||||
var g = parseInt((i / all.length) * 36)
|
||||
return "rgb(36, " + g + ", 0)"
|
||||
},
|
||||
width: '100',
|
||||
height: '82'
|
||||
})
|
||||
|
||||
$(".pie-colours-1").peity("pie", {
|
||||
fill: [vihoAdminConfig.primary, vihoAdminConfig.secondary, "#222222", "#717171"],
|
||||
width: '100',
|
||||
height: '82'
|
||||
})
|
||||
Reference in New Issue
Block a user