Adds warnings

This commit is contained in:
Roman Galochkin 2020-03-03 09:21:59 +03:00
parent 8d875cc00d
commit a997ce8aad
2 changed files with 6 additions and 4 deletions

View File

@ -208,4 +208,4 @@ let make = (~distPlus: DistTypes.distPlus) => {
);
<div> chart chart2 {table(distPlus, x)} </div>;
// chart
};
};

View File

@ -124,7 +124,6 @@ export class CdfChartD3 {
*/
getCommonThings() {
// Boundaries.
// @todo: To fix code construction.
const xMin = this.attrs.scale === 'linear' ?
(this.attrs.minX
|| d3.min(this.attrs.data.continuous.xs)
@ -139,6 +138,11 @@ export class CdfChartD3 {
const yMin = d3.min(this.attrs.data.continuous.ys);
const yMax = d3.max(this.attrs.data.continuous.ys);
if (!_.isFinite(xMin)) console.error('xMin is undefined');
if (!_.isFinite(xMax)) console.error('xMax is undefined');
if (!_.isFinite(yMin)) console.error('yMin is undefined');
if (!_.isFinite(yMax)) console.error('yMax is undefined');
// X-domains.
const yMaxDomainFactor = _.get(this.attrs, 'yMaxContinuousDomainFactor', 1);
const xMinDomain = xMin;
@ -215,8 +219,6 @@ export class CdfChartD3 {
// Y-axis.
const yAxis = d3.axisRight(yScale);
// Objects.
// Add axis.
this.chart
.createObject({ tag: 'g', selector: 'x-axis' })