Separates branches

This commit is contained in:
Roman Galochkin 2020-02-20 12:34:34 +03:00
parent 00589ad310
commit 4e0ce7ad02

View File

@ -161,8 +161,12 @@ export class CdfChartD3 {
'translate(' + this.calc.chartLeftMargin + ',' + this.calc.chartTopMargin + ')',
);
// A
this.addDistributionChart();
this.addLollipopsChart();
return this;
}
addDistributionChart() {
const areaColorRange = d3.scaleOrdinal().range(this.attrs.areaColors);
this.dataPoints = [this.getDataPoints('primary')];
@ -304,13 +308,13 @@ export class CdfChartD3 {
thi$.mouseover(this);
})
.on('mouseout', this.mouseout);
}
// Lollipops
{
addLollipopsChart() {
const data = [
{x: 3, y: 10},
{x: 5, y: 30},
{x: 7.5, y: 50},
{ x: 3, y: 10 },
{ x: 5, y: 30 },
{ x: 7.5, y: 50 },
];
const xs = [3, 5, 7.5];
@ -356,8 +360,6 @@ export class CdfChartD3 {
.attr("cy", d => y(d.y))
.attr("r", "4");
}
return this;
}
mouseover(constructor) {
const mouse = d3.mouse(constructor);