提交 2348815f 编写于 作者: J Jason Park

can attach ChartTracer to Array1DTracer

上级 0ebd242a
......@@ -39,6 +39,23 @@ class Array1DTracer extends Array2DTracer {
return this;
}
processStep(step, options) {
super.processStep(step, options);
if (this.chartTracer) {
const newStep = $.extend(true, {}, step);
newStep.capsule = this.chartTracer.capsule;
newStep.s = newStep.y || newStep.sy;
newStep.e = newStep.ey;
delete newStep.x;
delete newStep.y;
delete newStep.sx;
delete newStep.sy;
delete newStep.ex;
delete newStep.ey;
this.chartTracer.processStep(newStep, options);
}
}
setData(D) {
return super.setData([D]);
}
......
......@@ -88,8 +88,13 @@ class Tracer {
}
attach(tracer) {
if (tracer.module === LogTracer) {
this.logTracer = tracer;
switch (tracer.module) {
case LogTracer:
this.logTracer = tracer;
break;
case ChartTracer:
this.chartTracer = tracer;
break;
}
return this;
}
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册