Javascript 我怎样才能把这些线放在一个flot图表中?
我有这个功能:Javascript 我怎样才能把这些线放在一个flot图表中?,javascript,charts,flot,Javascript,Charts,Flot,我有这个功能: flotLinea:function(tareas){ var self = this; var options = { legend: { position:"nw", }, lines: { show: true, fill: true
flotLinea:function(tareas){
var self = this;
var options = {
legend: {
position:"nw",
},
lines:
{
show: true,
fill: true
},
points:
{
show: true
},
xaxis:
{
mode: "time",
minTickSize: [0, "day"],
timeformat: "%d/%m/%y"
},
yaxis:
{
min: 0,
tickSize:10,
tickDecimals: 0,
},
};
console.info(tareas);
$.plot("#grafico",tareas,options);
},
功能打印:
我怎样才能把这些线连在一起?或者更接近
我需要这样的东西:
我不希望两行之间有太多的空间您没有发布函数,只传递了设置 问题是两个数据集在同一图表上使用,并且x轴数据存在间隙。您需要将蓝线阵列x轴数据左移一个月 因此,在没有看到代码的情况下,假设您的蓝线有以下伪代码:
[[19-8-15, 40],[20-8-15, 50],[21-8-15, 50],etc...]
第一个元素需要向左移动:
[[18-8-15, 40],[19-8-15, 50],[20-8-15, 50],etc...] //<==== months now one less
[[18-8-15,40],[19-8-15,50],[20-8-15,50]等]/您没有发布函数,只传递了设置
问题是两个数据集在同一图表上使用,并且x轴数据存在间隙。您需要将蓝线阵列x轴数据左移一个月
因此,在没有看到代码的情况下,假设您的蓝线有以下伪代码:
[[19-8-15, 40],[20-8-15, 50],[21-8-15, 50],etc...]
第一个元素需要向左移动:
[[18-8-15, 40],[19-8-15, 50],[20-8-15, 50],etc...] //<==== months now one less
[[18-8-15,40]、[19-8-15,50]、[20-8-15,50]等]//