mirror of
https://github.com/Karaka-Management/jsOMS.git
synced 2026-02-16 09:18:42 +00:00
cleanup and tests added for ci/cd
This commit is contained in:
parent
fd791cca05
commit
da4032f5d6
|
|
@ -57,6 +57,7 @@
|
||||||
visible: true
|
visible: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chart.subtype = 'candlestick';
|
this.chart.subtype = 'candlestick';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -105,7 +106,7 @@
|
||||||
.attr("y", function(d) { return y(Math.max(d.open, d.close)); })
|
.attr("y", function(d) { return y(Math.max(d.open, d.close)); })
|
||||||
.attr("height", function(d) { return Math.max(1, y(Math.min(d.open, d.close)) - y(Math.max(d.open, d.close)));})
|
.attr("height", function(d) { return Math.max(1, y(Math.min(d.open, d.close)) - y(Math.max(d.open, d.close)));})
|
||||||
.attr("width", function(d) { return 0.5 * mm; })
|
.attr("width", function(d) { return 0.5 * mm; })
|
||||||
.attr("fill",function(d) { return d.open > d.close ? "red" : "green" ;});
|
.attr("fill",function(d) { return d.open > d.close ? "red" : "green"; });
|
||||||
} else {
|
} else {
|
||||||
let datapoint = svg.selectAll("rect")
|
let datapoint = svg.selectAll("rect")
|
||||||
.data(this.chart.dataset[0].points)
|
.data(this.chart.dataset[0].points)
|
||||||
|
|
@ -116,14 +117,14 @@
|
||||||
.attr("y", function(d) {return y(d.open);})
|
.attr("y", function(d) {return y(d.open);})
|
||||||
.attr("height", function(d) { return 1;})
|
.attr("height", function(d) { return 1;})
|
||||||
.attr("width", function(d) { return 0.25 * mm / 2; })
|
.attr("width", function(d) { return 0.25 * mm / 2; })
|
||||||
.attr("fill",function(d) { return d.open > d.close ? "red" : "green" ;});
|
.attr("fill",function(d) { return d.open > d.close ? "red" : "green"; });
|
||||||
|
|
||||||
datapoint.append("svg:rect")
|
datapoint.append("svg:rect")
|
||||||
.attr("x", function(d) { return x(d.x); })
|
.attr("x", function(d) { return x(d.x); })
|
||||||
.attr("y", function(d) {return y(d.close);})
|
.attr("y", function(d) {return y(d.close);})
|
||||||
.attr("height", function(d) { return 1;})
|
.attr("height", function(d) { return 1;})
|
||||||
.attr("width", function(d) { return 0.25 * mm / 2; })
|
.attr("width", function(d) { return 0.25 * mm / 2; })
|
||||||
.attr("fill",function(d) { return d.open > d.close ? "red" : "green" ;});
|
.attr("fill",function(d) { return d.open > d.close ? "red" : "green"; });
|
||||||
}
|
}
|
||||||
|
|
||||||
svg.selectAll("line.stem")
|
svg.selectAll("line.stem")
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@
|
||||||
{
|
{
|
||||||
return x(d.x) + x.rangeBand() / self.chart.dataset.length * j;
|
return x(d.x) + x.rangeBand() / self.chart.dataset.length * j;
|
||||||
})
|
})
|
||||||
.attr("width", x.rangeBand() /self.chart.dataset.length)
|
.attr("width", x.rangeBand() / self.chart.dataset.length)
|
||||||
.transition()
|
.transition()
|
||||||
.attr("y", function (d)
|
.attr("y", function (d)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
- Math.max(this.chart.margin.right + this.chart.margin.left,
|
- Math.max(this.chart.margin.right + this.chart.margin.left,
|
||||||
this.chart.margin.top + this.chart.margin.bottom)
|
this.chart.margin.top + this.chart.margin.bottom)
|
||||||
),
|
),
|
||||||
innerRadius = radius - radius*self.chart.dataSettings.style.strokewidth,
|
innerRadius = radius - radius * self.chart.dataSettings.style.strokewidth,
|
||||||
arc = d3.svg.arc()
|
arc = d3.svg.arc()
|
||||||
.outerRadius(function() { return radius; })
|
.outerRadius(function() { return radius; })
|
||||||
.innerRadius(function() { return innerRadius; });
|
.innerRadius(function() { return innerRadius; });
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@
|
||||||
visible: true
|
visible: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chart.subtype = 'waterfall';
|
this.chart.subtype = 'waterfall';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -136,7 +137,7 @@
|
||||||
.tickFormat("");
|
.tickFormat("");
|
||||||
|
|
||||||
x.domain(this.chart.dataset[0].points.map(function(d) { return d.name; }));
|
x.domain(this.chart.dataset[0].points.map(function(d) { return d.name; }));
|
||||||
y.domain([0, d3.max(this.chart.dataset[0].points, function(d) { return d.y*1.05; })]);
|
y.domain([0, d3.max(this.chart.dataset[0].points, function(d) { return d.y * 1.05; })]);
|
||||||
|
|
||||||
svg = this.chart.chartSelect.append("svg")
|
svg = this.chart.chartSelect.append("svg")
|
||||||
.attr("width", this.chart.dimension.width)
|
.attr("width", this.chart.dimension.width)
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@
|
||||||
visible: true
|
visible: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.chart.subtype = 'scatterplot';
|
this.chart.subtype = 'scatterplot';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ export class EventManager {
|
||||||
{
|
{
|
||||||
if (this.callbacks.hasOwnProperty(group)) {
|
if (this.callbacks.hasOwnProperty(group)) {
|
||||||
return this.triggerSingleEvent(group, id, data);
|
return this.triggerSingleEvent(group, id, data);
|
||||||
}
|
}p
|
||||||
|
|
||||||
const allGroups = Object.keys(this.callbacks),
|
const allGroups = Object.keys(this.callbacks),
|
||||||
regex = new RegExp(group),
|
regex = new RegExp(group),
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
this.connection = null;
|
this.connection = null;
|
||||||
this.messages = [];
|
this.messages = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
jsOMS.Client.prototype.setMessage = function(id, callback) {
|
jsOMS.Client.prototype.setMessage = function(id, callback) {
|
||||||
this.messages[id] = callback;
|
this.messages[id] = callback;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ export class Tab {
|
||||||
this.bindElement(e);
|
this.bindElement(e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const tabs = document.getElementsByClassName('tabview'),
|
const tabs = document.getElementsByClassName('tabview');
|
||||||
length = !tabs ? 0 : tabs.length;
|
const length = !tabs ? 0 : tabs.length;
|
||||||
|
|
||||||
for (let i = 0; i < length; ++i) {
|
for (let i = 0; i < length; ++i) {
|
||||||
this.bindElement(tabs[i]);
|
this.bindElement(tabs[i]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user