WebRoot/admin/assets/js/pages/widgets.js
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*
FlotChart
*/
function randNum(){
return ((Math.floor( Math.random()* (1+40-0) ) ) + 10)* 10;
}
$(document).ready(function(){
if($("#dotChart1").length)
{
var likes = [[1, 5+randNum()], [2, 10+randNum()], [3, 40+randNum()], [4, 60+randNum()],[5, 90+randNum()],[6, 40+randNum()],[7, 25+randNum()],[8, 35+randNum()]];
var plot = $.plot($("#dotChart1"),
[ { data: likes, label: "Profit"} ], {
series: {
lines: { show: true,
lineWidth: 2,
fill: false, fillColor: { colors: [ { opacity: 0.5 }, { opacity: 0.2 } ] }
},
points: { show: true,
lineWidth: 3
},
shadowSize: 0
},
grid: { hoverable: true,
clickable: true,
tickColor: "#fff",
borderWidth: 0
},
colors: ["#75b9e6"],
xaxis: {ticks:20, tickDecimals: 0},
yaxis: {ticks:7, tickDecimals: 0},
});
function showTooltip(x, y, contents) {
$('<div id="tooltip">' + contents + '</div>').css( {
position: 'absolute',
display: 'none',
top: y + 5,
left: x + 5,
border: '1px solid #fdd',
padding: '2px',
'background-color': '#dfeffc',
opacity: 0.80
}).appendTo("body").fadeIn(200);
}
var previousPoint = null;
$("#dotChart1").bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
if (item) {
if (previousPoint != item.dataIndex) {
previousPoint = item.dataIndex;
后面还有 112 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。