Javascript 在一个系列花絮上使用几个符号
我正在使用FlotJS库,我想用几种符号类型显示一个系列中的一些点。 我想有线显示和几个选定的点,但不是全部。 有没有办法做到这一点 编辑: 我刚刚发现是谁帮助我理解了它的工作原理,但是,我想继续Javascript 在一个系列花絮上使用几个符号,javascript,flot,Javascript,Flot,我正在使用FlotJS库,我想用几种符号类型显示一个系列中的一些点。 我想有线显示和几个选定的点,但不是全部。 有没有办法做到这一点 编辑: 我刚刚发现是谁帮助我理解了它的工作原理,但是,我想继续 grid : {hoverable : true} 它产生了一个模的显示错误,有没有办法覆盖它? 相关的要绘制高光,flot仍在调用someFunc函数,someFunc.calls仍在递增并控制高光的绘制方式。因此,在$.plot之后,我只想“关闭时关闭”: 其中someFunc是: functi
grid : {hoverable : true}
它产生了一个模的显示错误,有没有办法覆盖它?
相关的要绘制高光,flot仍在调用
someFunc
函数,someFunc.calls
仍在递增并控制高光的绘制方式。因此,在$.plot
之后,我只想“关闭时关闭”:
其中someFunc
是:
function someFunc(ctx, x, y, radius, shadow)
{
if (someFunc.calls === false) {
// we are highlighting, draw it normal
ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
} else {
// intial draw, do fancy points...
someFunc.calls++;
if (someFunc.calls % 2 == 0)
{
ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
}
else
{
ctx.arc(x, y, 0, 0, shadow ? Math.PI : Math.PI * 2, false);
}
}
}
更新
function someFunc(ctx, x, y, radius, shadow)
{
if (someFunc.calls === false) {
// we are highlighting, draw it normal
ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
} else {
// intial draw, do fancy points...
someFunc.calls++;
if (someFunc.calls % 2 == 0)
{
ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false);
}
else
{
ctx.arc(x, y, 0, 0, shadow ? Math.PI : Math.PI * 2, false);
}
}
}