WebRoot/admin/assets/js/pages/charts-other.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
$(document).ready(function(){
/* ---------- Sparkline Charts ---------- */
//generate random number for charts
randNum = function(){
//return Math.floor(Math.random()*101);
return (Math.floor( Math.random()* (1+40-20) ) ) + 20;
}
var chartColours = ['#2FABE9', '#FA5833', '#b9e672', '#bbdce3', '#9a3b1b', '#5a8022', '#2c7282'];
//sparklines (making loop with random data for all 7 sparkline)
i=1;
for (i=1; i<9; i++) {
var data = [[1, 3+randNum()], [2, 5+randNum()], [3, 8+randNum()], [4, 11+randNum()],[5, 14+randNum()],[6, 17+randNum()],[7, 20+randNum()], [8, 15+randNum()], [9, 18+randNum()], [10, 22+randNum()]];
placeholder = '.sparkLineStats' + i;
if (retina()) {
$(placeholder).sparkline(data, {
width: 200,//Width of the chart - Defaults to 'auto' - May be any valid css width - 1.5em, 20px, etc (using a number without a unit specifier won't do what you want) - This option does nothing for bar and tristate chars (see barWidth)
height: 60,//Height of the chart - Defaults to 'auto' (line height of the containing tag)
lineColor: '#2FABE9',//Used by line and discrete charts to specify the colour of the line drawn as a CSS values string
fillColor: '#f2f7f9',//Specify the colour used to fill the area under the graph as a CSS value. Set to false to disable fill
spotColor: '#467e8c',//The CSS colour of the final value marker. Set to false or an empty string to hide it
maxSpotColor: '#b9e672',//The CSS colour of the marker displayed for the maximum value. Set to false or an empty string to hide it
minSpotColor: '#FA5833',//The CSS colour of the marker displayed for the mimum value. Set to false or an empty string to hide it
spotRadius: 2,//Radius of all spot markers, In pixels (default: 1.5) - Integer
lineWidth: 1//In pixels (default: 1) - Integer
});
//only firefox sux in this case
if (jQuery.browser.mozilla) {
$(placeholder).css('MozTransform','scale(0.5,0.5)').css('margin-top','-10px');
$(placeholder).css('height','30px').css('width','100px').css('margin-left','-20px').css('margin-right','40px');
} else {
$(placeholder).css('zoom',0.5);
}
} else {
$(placeholder).sparkline(data, {
width: 100,//Width of the chart - Defaults to 'auto' - May be any valid css width - 1.5em, 20px, etc (using a number without a unit specifier won't do what you want) - This option does nothing for bar and tristate chars (see barWidth)
height: 30,//Height of the chart - Defaults to 'auto' (line height of the containing tag)
lineColor: '#2FABE9',//Used by line and discrete charts to specify the colour of the line drawn as a CSS values string
fillColor: '#f2f7f9',//Specify the colour used to fill the area under the graph as a CSS value. Set to false to disable fill
spotColor: '#467e8c',//The CSS colour of the final value marker. Set to false or an empty string to hide it
maxSpotColor: '#b9e672',//The CSS colour of the marker displayed for the maximum value. Set to false or an empty string to hide it
minSpotColor: '#FA5833',//The CSS colour of the marker displayed for the mimum value. Set to false or an empty string to hide it
spotRadius: 2,//Radius of all spot markers, In pixels (default: 1.5) - Integer
lineWidth: 1//In pixels (default: 1) - Integer
});
}
}
/* ---------- Init jQuery Knob - disbaled in IE8, IE7, IE6 ---------- */
if(jQuery.browser.version.substring(0, 2) == "8.") {
后面还有 118 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。