我正在尝试用x,y坐标创建一个简单的折线图,但我得到一个空白页面.
我不想设置标签,但要从x,y坐标自动生成标签.我认为chartjs已经实现了,但我的语法错了.
var x = new Chart(document.getElementById("myChart1"), {
type: 'line',
data: {
datasets: [{
label: "Test",
data: [{
x: 0,
y: 5
}, {
x: 5,
y: 10
}, {
x: 8,
y: 5
}, {
x: 15,
y: 0
}],
}]
},
options: {
responsive: true,
}
});
Run Code Online (Sandbox Code Playgroud)
知道如何修复上面的代码吗?
我需要把一个棘手的页脚我的网页上,但我没有一个明确的高度,我的页脚设置.在较小的屏幕上 - 行调整大小,页脚变长.
因此,getbootstrap上提供的默认粘性页脚示例不起作用,因为它需要固定的页脚高度.
有没有办法实现这个?
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
line-height: 60px; /* Vertically center the text there */
background-color: #f5f5f5;
}
/* Custom page CSS
-------------------------------------------------- */
/* Not required for template or sticky footer method. */
body > …
Run Code Online (Sandbox Code Playgroud) 我有一个控制器方法,我想每分钟运行一次。我阅读了任务计划的文档,但它似乎只记录了命令。
有什么方法可以使用它每分钟调用路由/控制器方法/脚本吗?
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Acc;
class ScriptController extends Controller
{
public function updateAcc()
{
$c = new Scripts\AccountA();
$xoo = $c->getInfo();
$z = json_decode($xoo,true);
$data= new Acc();
$data->price = $z["result"];
$data->save();
}
}
Run Code Online (Sandbox Code Playgroud)
我需要使用数据库外观和外部类等......
bootstrap-4 ×1
chart.js ×1
cron ×1
css ×1
html ×1
javascript ×1
laravel ×1
laravel-5 ×1
php ×1