@devexpress/dx-chart-core
Advanced tools
Comparing version 1.3.0-beta.2 to 1.3.0
/** | ||
* Bundle of @devexpress/dx-chart-core | ||
* Generated: 2018-05-24 | ||
* Version: 1.3.0-beta.2 | ||
* Generated: 2018-06-04 | ||
* Version: 1.3.0 | ||
* License: https://js.devexpress.com/Licensing | ||
@@ -249,2 +249,9 @@ */ | ||
var getCorrectAxisType = function getCorrectAxisType(type, data, field) { | ||
if (!type && typeof data[0][field] === 'string') { | ||
return 'band'; | ||
} | ||
return type; | ||
}; | ||
var calculateDomain = function calculateDomain(series, data, axesTypes, argumentAxisName) { | ||
@@ -258,10 +265,13 @@ return series.reduce(function (domains, _ref2) { | ||
name = _ref2.name; | ||
var valueType = getCorrectAxisType(domains[axisName] && domains[axisName].type, data, valueField); | ||
var argumentType = getCorrectAxisType(domains[argumentAxisName] && domains[argumentAxisName].type, data, argumentField); | ||
return _extends({}, domains, (_babelHelpers$extends2 = {}, defineProperty(_babelHelpers$extends2, axisName, { | ||
domain: calculateDomainField(valueField + '-' + name + '-end', data, domains[axisName] && domains[axisName].domain, domains[axisName] && domains[axisName].type), | ||
domain: calculateDomainField(valueField + '-' + name + '-end', data, domains[axisName] && domains[axisName].domain, valueType), | ||
orientation: VERTICAL, | ||
type: domains[axisName] && domains[axisName].type | ||
type: valueType | ||
}), defineProperty(_babelHelpers$extends2, argumentAxisName, { | ||
domain: calculateDomainField(argumentField, data, domains[argumentAxisName] && domains[argumentAxisName].domain, domains[argumentAxisName] && domains[argumentAxisName].type), | ||
domain: calculateDomainField(argumentField, data, domains[argumentAxisName] && domains[argumentAxisName].domain, argumentType), | ||
orientation: HORIZONTAL, | ||
type: domains[argumentAxisName] && domains[argumentAxisName].type | ||
type: argumentType | ||
}), _babelHelpers$extends2)); | ||
@@ -275,20 +285,34 @@ }, axesTypes); | ||
var recalculateDomain = function recalculateDomain(range, currentDomain) { | ||
return { | ||
domain: currentDomain.type !== BAND ? range : currentDomain.domain, | ||
type: currentDomain.type, | ||
orientation: currentDomain.orientation | ||
}; | ||
}; | ||
var adjustDomains = function adjustDomains(axes, calculatedDomains, startFromZero) { | ||
var adjustedDomainsBySeries = Object.keys(calculatedDomains).reduce(function (domains, name) { | ||
var currentDomain = domains[name]; | ||
var range = startFromZero[name] ? adjustRangeToZero(currentDomain.domain) : currentDomain.domain; | ||
return _extends({}, domains, defineProperty({}, name, recalculateDomain(range, currentDomain))); | ||
}, calculatedDomains); | ||
return axes.reduce(function (domains, _ref3) { | ||
var name = _ref3.name, | ||
min = _ref3.min, | ||
max = _ref3.max, | ||
type = _ref3.type; | ||
max = _ref3.max; | ||
var currentDomain = domains[name]; | ||
var range = startFromZero[name] ? adjustRangeToZero(currentDomain.domain) : currentDomain.domain; | ||
return _extends({}, domains, defineProperty({}, name, { | ||
domain: type !== BAND ? [isDefined(min) ? min : range[0], isDefined(max) ? max : range[1]] : currentDomain.domain, | ||
type: currentDomain.type, | ||
orientation: currentDomain.orientation | ||
})); | ||
}, calculatedDomains); | ||
return _extends({}, domains, defineProperty({}, name, recalculateDomain([isDefined(min) ? min : currentDomain.domain[0], isDefined(max) ? max : currentDomain.domain[1]], currentDomain))); | ||
}, adjustedDomainsBySeries); | ||
}; | ||
var domains = function domains(axes, series, data, argumentAxisName, startFromZero) { | ||
var domains = function domains() { | ||
var axes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; | ||
var series = arguments[1]; | ||
var data = arguments[2]; | ||
var argumentAxisName = arguments[3]; | ||
var startFromZero = arguments[4]; | ||
var axesTypes = collectAxesTypes(axes); | ||
@@ -566,3 +590,7 @@ var calculatedDomains = calculateDomain(series, data, axesTypes, argumentAxisName); | ||
export { domains, bBoxes, axisCoordinates, axesData, xyScales, pieAttributes, coordinates, findSeriesByName, lineAttributes, pointAttributes, barPointAttributes, seriesData, checkZeroStart, createScale, HORIZONTAL, VERTICAL, TOP, BOTTOM, LEFT, RIGHT, MIDDLE, END, START, BAND, processData, seriesWithStacks, stacks, palette }; | ||
var axisName = function axisName(argumentAxisName) { | ||
return argumentAxisName || 'argumentAxis'; | ||
}; | ||
export { domains, bBoxes, axisCoordinates, axesData, xyScales, pieAttributes, coordinates, findSeriesByName, lineAttributes, pointAttributes, barPointAttributes, seriesData, checkZeroStart, createScale, HORIZONTAL, VERTICAL, TOP, BOTTOM, LEFT, RIGHT, MIDDLE, END, START, BAND, processData, seriesWithStacks, stacks, palette, axisName }; | ||
//# sourceMappingURL=dx-chart-core.es.js.map |
/** | ||
* Bundle of @devexpress/dx-chart-core | ||
* Generated: 2018-05-24 | ||
* Version: 1.3.0-beta.2 | ||
* Generated: 2018-06-04 | ||
* Version: 1.3.0 | ||
* License: https://js.devexpress.com/Licensing | ||
@@ -251,2 +251,9 @@ */ | ||
var getCorrectAxisType = function getCorrectAxisType(type, data, field) { | ||
if (!type && typeof data[0][field] === 'string') { | ||
return 'band'; | ||
} | ||
return type; | ||
}; | ||
var calculateDomain = function calculateDomain(series, data, axesTypes, argumentAxisName) { | ||
@@ -260,10 +267,13 @@ return series.reduce(function (domains, _ref2) { | ||
name = _ref2.name; | ||
var valueType = getCorrectAxisType(domains[axisName] && domains[axisName].type, data, valueField); | ||
var argumentType = getCorrectAxisType(domains[argumentAxisName] && domains[argumentAxisName].type, data, argumentField); | ||
return _extends({}, domains, (_babelHelpers$extends2 = {}, defineProperty(_babelHelpers$extends2, axisName, { | ||
domain: calculateDomainField(valueField + '-' + name + '-end', data, domains[axisName] && domains[axisName].domain, domains[axisName] && domains[axisName].type), | ||
domain: calculateDomainField(valueField + '-' + name + '-end', data, domains[axisName] && domains[axisName].domain, valueType), | ||
orientation: VERTICAL, | ||
type: domains[axisName] && domains[axisName].type | ||
type: valueType | ||
}), defineProperty(_babelHelpers$extends2, argumentAxisName, { | ||
domain: calculateDomainField(argumentField, data, domains[argumentAxisName] && domains[argumentAxisName].domain, domains[argumentAxisName] && domains[argumentAxisName].type), | ||
domain: calculateDomainField(argumentField, data, domains[argumentAxisName] && domains[argumentAxisName].domain, argumentType), | ||
orientation: HORIZONTAL, | ||
type: domains[argumentAxisName] && domains[argumentAxisName].type | ||
type: argumentType | ||
}), _babelHelpers$extends2)); | ||
@@ -277,20 +287,34 @@ }, axesTypes); | ||
var recalculateDomain = function recalculateDomain(range, currentDomain) { | ||
return { | ||
domain: currentDomain.type !== BAND ? range : currentDomain.domain, | ||
type: currentDomain.type, | ||
orientation: currentDomain.orientation | ||
}; | ||
}; | ||
var adjustDomains = function adjustDomains(axes, calculatedDomains, startFromZero) { | ||
var adjustedDomainsBySeries = Object.keys(calculatedDomains).reduce(function (domains, name) { | ||
var currentDomain = domains[name]; | ||
var range = startFromZero[name] ? adjustRangeToZero(currentDomain.domain) : currentDomain.domain; | ||
return _extends({}, domains, defineProperty({}, name, recalculateDomain(range, currentDomain))); | ||
}, calculatedDomains); | ||
return axes.reduce(function (domains, _ref3) { | ||
var name = _ref3.name, | ||
min = _ref3.min, | ||
max = _ref3.max, | ||
type = _ref3.type; | ||
max = _ref3.max; | ||
var currentDomain = domains[name]; | ||
var range = startFromZero[name] ? adjustRangeToZero(currentDomain.domain) : currentDomain.domain; | ||
return _extends({}, domains, defineProperty({}, name, { | ||
domain: type !== BAND ? [isDefined(min) ? min : range[0], isDefined(max) ? max : range[1]] : currentDomain.domain, | ||
type: currentDomain.type, | ||
orientation: currentDomain.orientation | ||
})); | ||
}, calculatedDomains); | ||
return _extends({}, domains, defineProperty({}, name, recalculateDomain([isDefined(min) ? min : currentDomain.domain[0], isDefined(max) ? max : currentDomain.domain[1]], currentDomain))); | ||
}, adjustedDomainsBySeries); | ||
}; | ||
var domains = function domains(axes, series, data, argumentAxisName, startFromZero) { | ||
var domains = function domains() { | ||
var axes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; | ||
var series = arguments[1]; | ||
var data = arguments[2]; | ||
var argumentAxisName = arguments[3]; | ||
var startFromZero = arguments[4]; | ||
var axesTypes = collectAxesTypes(axes); | ||
@@ -568,2 +592,6 @@ var calculatedDomains = calculateDomain(series, data, axesTypes, argumentAxisName); | ||
var axisName = function axisName(argumentAxisName) { | ||
return argumentAxisName || 'argumentAxis'; | ||
}; | ||
exports.domains = domains; | ||
@@ -597,2 +625,3 @@ exports.bBoxes = bBoxes; | ||
exports.palette = palette; | ||
exports.axisName = axisName; | ||
@@ -599,0 +628,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
{ | ||
"name": "@devexpress/dx-chart-core", | ||
"version": "1.3.0-beta.2", | ||
"version": "1.3.0", | ||
"description": "Core library for the DevExtreme Reactive Chart component", | ||
@@ -42,4 +42,4 @@ "author": { | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-jest": "^22.4.1", | ||
"babel-core": "^6.26.3", | ||
"babel-jest": "^23.0.1", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
@@ -49,11 +49,11 @@ "babel-plugin-transform-object-rest-spread": "^6.26.0", | ||
"babel-preset-es2015": "^6.24.1", | ||
"core-js": "^2.5.3", | ||
"eslint": "^4.18.1", | ||
"core-js": "^2.5.7", | ||
"eslint": "^4.19.1", | ||
"eslint-config-airbnb-base": "^12.1.0", | ||
"eslint-plugin-filenames": "^1.2.0", | ||
"eslint-plugin-import": "^2.9.0", | ||
"eslint-plugin-jest": "^21.15.1", | ||
"jest": "^22.4.2", | ||
"eslint-plugin-import": "^2.12.0", | ||
"eslint-plugin-jest": "^21.17.0", | ||
"jest": "^23.1.0", | ||
"rollup": "0.50.0", | ||
"rollup-plugin-babel": "^3.0.3", | ||
"rollup-plugin-babel": "^3.0.4", | ||
"rollup-plugin-license": "^0.6.0" | ||
@@ -60,0 +60,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
85040
961
0
1