cleanup and tests added for ci/cd

This commit is contained in:
Dennis Eichhorn 2019-11-20 22:27:51 +01:00
parent fd791cca05
commit da4032f5d6
23 changed files with 125 additions and 121 deletions

View File

@ -57,6 +57,7 @@
visible: true
}
};
this.chart.subtype = 'candlestick';
};
@ -105,7 +106,7 @@
.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("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 {
let datapoint = svg.selectAll("rect")
.data(this.chart.dataset[0].points)
@ -116,14 +117,14 @@
.attr("y", function(d) {return y(d.open);})
.attr("height", function(d) { return 1;})
.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")
.attr("x", function(d) { return x(d.x); })
.attr("y", function(d) {return y(d.close);})
.attr("height", function(d) { return 1;})
.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")

View File

@ -189,7 +189,7 @@
{
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()
.attr("y", function (d)
{

View File

@ -75,7 +75,7 @@
- Math.max(this.chart.margin.right + this.chart.margin.left,
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()
.outerRadius(function() { return radius; })
.innerRadius(function() { return innerRadius; });

View File

@ -53,6 +53,7 @@
visible: true
}
};
this.chart.subtype = 'waterfall';
};
@ -136,7 +137,7 @@
.tickFormat("");
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")
.attr("width", this.chart.dimension.width)

View File

@ -54,6 +54,7 @@
visible: true
}
};
this.chart.subtype = 'scatterplot';
};

View File

@ -103,7 +103,7 @@ export class EventManager {
{
if (this.callbacks.hasOwnProperty(group)) {
return this.triggerSingleEvent(group, id, data);
}
}p
const allGroups = Object.keys(this.callbacks),
regex = new RegExp(group),

View File

@ -8,6 +8,7 @@
this.connection = null;
this.messages = [];
};
jsOMS.Client.prototype.setMessage = function(id, callback) {
this.messages[id] = callback;
};

View File

@ -38,8 +38,8 @@ export class Tab {
this.bindElement(e);
}
} else {
const tabs = document.getElementsByClassName('tabview'),
length = !tabs ? 0 : tabs.length;
const tabs = document.getElementsByClassName('tabview');
const length = !tabs ? 0 : tabs.length;
for (let i = 0; i < length; ++i) {
this.bindElement(tabs[i]);