Skip to content
Permalink
Browse files

chore: version up v3.5.1

  • Loading branch information...
jinwoo-kim-nhn committed Feb 1, 2019
1 parent 5bd8527 commit fa59bb19e72184535ce7ae792865a968d7598cd5
@@ -2,10 +2,10 @@
* tui-chart-all
* @fileoverview tui-chart
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
* @version 3.5.0
* @version 3.5.1
* @license MIT
* @link https://github.com/nhnent/tui.chart
* bundle created at "Fri Jan 11 2019 10:58:28 GMT+0900 (GMT+09:00)"
* bundle created at "Fri Feb 01 2019 15:20:34 GMT+0900 (GMT+09:00)"
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
return position;
};

/**
* Calculate xAxis labelDistance
* @param {number} width - width of xAxis
* @param {object} xAxisData - x axis data
* @returns {number}
* @private
*/


Plot.prototype._calculateXAxisLabelDistance = function _calculateXAxisLabelDistance(width, xAxisData) {
var _xAxisData$sizeRatio = xAxisData.sizeRatio,
sizeRatio = _xAxisData$sizeRatio === undefined ? 1 : _xAxisData$sizeRatio,
tickCount = xAxisData.tickCount,
remainLastBlockInterval = xAxisData.remainLastBlockInterval;

var remainLastBlockIntervalPosition = remainLastBlockInterval ? width : 0;
var tickPixelPositions = _calculator2['default'].makeTickPixelPositions(width * sizeRatio, tickCount, 0, remainLastBlockIntervalPosition);

return tickPixelPositions[1] - tickPixelPositions[0];
};

/**
* Create position for optional line, when label axis.
* @param {number} width - width
* @param {object} xAxisData - x axis data
* @param {number} value - value
* @returns {number|null}
* @private
*/


Plot.prototype._createOptionalLinePositionWhenLabelAxis = function _createOptionalLinePositionWhenLabelAxis(width, value) {
Plot.prototype._createOptionalLinePositionWhenLabelAxis = function _createOptionalLinePositionWhenLabelAxis(width, xAxisData, value) {
var dataProcessor = this.dataProcessor;

var isLineTypeChart = _predicate2['default'].isLineTypeChart(dataProcessor.chartType, dataProcessor.seriesTypes);
var isPointOnColumn = isLineTypeChart && xAxisData.options.pointOnColumn;
var index = dataProcessor.findCategoryIndex(value);
var halfLabelDistance = this._calculateXAxisLabelDistance(width, xAxisData) / 2;

var position = null;
var ratio = void 0;

if (!_tuiCodeSnippet2['default'].isNull(index)) {
ratio = index === 0 ? 0 : index / (dataProcessor.getCategoryCount() - 1);
var categoryCount = dataProcessor.getCategoryCount();
var divCount = isPointOnColumn ? categoryCount : categoryCount - 1;

ratio = index === 0 ? 0 : index / divCount;

position = ratio * width;
if (isPointOnColumn) {
position += halfLabelDistance;
}
}

if (ratio === 1) {
endPosition = void 0;

if (xAxisData.isLabelAxis) {
startPosition = this._createOptionalLinePositionWhenLabelAxis(width, range[0]);
endPosition = this._createOptionalLinePositionWhenLabelAxis(width, range[1]);
startPosition = this._createOptionalLinePositionWhenLabelAxis(width, xAxisData, range[0]);
endPosition = this._createOptionalLinePositionWhenLabelAxis(width, xAxisData, range[1]);
} else {
startPosition = this._createOptionalLinePosition(xAxisData, width, range[0]);
endPosition = range[1] && this._createOptionalLinePosition(xAxisData, width, range[1]);

/**
* series data
* @type {Array.<object>}
* @type {object}
*/
this.seriesData = [];
this.seriesData = {};

/**
* Selected legend index
this.labelSet.remove();
}

this.seriesData = [];
this.seriesData = {};
};

/**
}
};

Series.prototype.isAvailableSeriesData = function isAvailableSeriesData() {
return !!(this.seriesData && this.seriesData.isAvailable && this.seriesData.isAvailable());
};

/**
* Return boolean value whether seriesData contains data
* @param {object} seriesData seriesData object


LineTypeSeriesBase.prototype.onHideGroupTooltipLine = function onHideGroupTooltipLine() {
if (!this.seriesData || !this.seriesData.isAvailable() || !this.graphRenderer.hideGroupTooltipLine) {
if (!this.isAvailableSeriesData() || !this.graphRenderer.hideGroupTooltipLine) {
return;
}
this.graphRenderer.hideGroupTooltipLine();

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,10 +2,10 @@
* tui-chart-polyfill
* @fileoverview tui-chart
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
* @version 3.5.0
* @version 3.5.1
* @license MIT
* @link https://github.com/nhnent/tui.chart
* bundle created at "Fri Jan 11 2019 10:58:53 GMT+0900 (GMT+09:00)"
* bundle created at "Fri Feb 01 2019 15:20:58 GMT+0900 (GMT+09:00)"
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
return position;
};

/**
* Calculate xAxis labelDistance
* @param {number} width - width of xAxis
* @param {object} xAxisData - x axis data
* @returns {number}
* @private
*/


Plot.prototype._calculateXAxisLabelDistance = function _calculateXAxisLabelDistance(width, xAxisData) {
var _xAxisData$sizeRatio = xAxisData.sizeRatio,
sizeRatio = _xAxisData$sizeRatio === undefined ? 1 : _xAxisData$sizeRatio,
tickCount = xAxisData.tickCount,
remainLastBlockInterval = xAxisData.remainLastBlockInterval;

var remainLastBlockIntervalPosition = remainLastBlockInterval ? width : 0;
var tickPixelPositions = _calculator2['default'].makeTickPixelPositions(width * sizeRatio, tickCount, 0, remainLastBlockIntervalPosition);

return tickPixelPositions[1] - tickPixelPositions[0];
};

/**
* Create position for optional line, when label axis.
* @param {number} width - width
* @param {object} xAxisData - x axis data
* @param {number} value - value
* @returns {number|null}
* @private
*/


Plot.prototype._createOptionalLinePositionWhenLabelAxis = function _createOptionalLinePositionWhenLabelAxis(width, value) {
Plot.prototype._createOptionalLinePositionWhenLabelAxis = function _createOptionalLinePositionWhenLabelAxis(width, xAxisData, value) {
var dataProcessor = this.dataProcessor;

var isLineTypeChart = _predicate2['default'].isLineTypeChart(dataProcessor.chartType, dataProcessor.seriesTypes);
var isPointOnColumn = isLineTypeChart && xAxisData.options.pointOnColumn;
var index = dataProcessor.findCategoryIndex(value);
var halfLabelDistance = this._calculateXAxisLabelDistance(width, xAxisData) / 2;

var position = null;
var ratio = void 0;

if (!_tuiCodeSnippet2['default'].isNull(index)) {
ratio = index === 0 ? 0 : index / (dataProcessor.getCategoryCount() - 1);
var categoryCount = dataProcessor.getCategoryCount();
var divCount = isPointOnColumn ? categoryCount : categoryCount - 1;

ratio = index === 0 ? 0 : index / divCount;

position = ratio * width;
if (isPointOnColumn) {
position += halfLabelDistance;
}
}

if (ratio === 1) {
endPosition = void 0;

if (xAxisData.isLabelAxis) {
startPosition = this._createOptionalLinePositionWhenLabelAxis(width, range[0]);
endPosition = this._createOptionalLinePositionWhenLabelAxis(width, range[1]);
startPosition = this._createOptionalLinePositionWhenLabelAxis(width, xAxisData, range[0]);
endPosition = this._createOptionalLinePositionWhenLabelAxis(width, xAxisData, range[1]);
} else {
startPosition = this._createOptionalLinePosition(xAxisData, width, range[0]);
endPosition = range[1] && this._createOptionalLinePosition(xAxisData, width, range[1]);

/**
* series data
* @type {Array.<object>}
* @type {object}
*/
this.seriesData = [];
this.seriesData = {};

/**
* Selected legend index
this.labelSet.remove();
}

this.seriesData = [];
this.seriesData = {};
};

/**
}
};

Series.prototype.isAvailableSeriesData = function isAvailableSeriesData() {
return !!(this.seriesData && this.seriesData.isAvailable && this.seriesData.isAvailable());
};

/**
* Return boolean value whether seriesData contains data
* @param {object} seriesData seriesData object


LineTypeSeriesBase.prototype.onHideGroupTooltipLine = function onHideGroupTooltipLine() {
if (!this.seriesData || !this.seriesData.isAvailable() || !this.graphRenderer.hideGroupTooltipLine) {
if (!this.isAvailableSeriesData() || !this.graphRenderer.hideGroupTooltipLine) {
return;
}
this.graphRenderer.hideGroupTooltipLine();

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -2,10 +2,10 @@
* tui-chart
* @fileoverview tui-chart
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
* @version 3.5.0
* @version 3.5.1
* @license MIT
* @link https://github.com/nhnent/tui.chart
* bundle created at "Fri Jan 11 2019 10:59:16 GMT+0900 (GMT+09:00)"
* bundle created at "Fri Feb 01 2019 15:21:21 GMT+0900 (GMT+09:00)"
*/
.tui-chart {
position: relative;
@@ -2,10 +2,10 @@
* tui-chart
* @fileoverview tui-chart
* @author NHN Ent. FE Development Lab <dl_javascript@nhnent.com>
* @version 3.5.0
* @version 3.5.1
* @license MIT
* @link https://github.com/nhnent/tui.chart
* bundle created at "Fri Jan 11 2019 10:59:16 GMT+0900 (GMT+09:00)"
* bundle created at "Fri Feb 01 2019 15:21:21 GMT+0900 (GMT+09:00)"
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
return position;
};

/**
* Calculate xAxis labelDistance
* @param {number} width - width of xAxis
* @param {object} xAxisData - x axis data
* @returns {number}
* @private
*/


Plot.prototype._calculateXAxisLabelDistance = function _calculateXAxisLabelDistance(width, xAxisData) {
var _xAxisData$sizeRatio = xAxisData.sizeRatio,
sizeRatio = _xAxisData$sizeRatio === undefined ? 1 : _xAxisData$sizeRatio,
tickCount = xAxisData.tickCount,
remainLastBlockInterval = xAxisData.remainLastBlockInterval;

var remainLastBlockIntervalPosition = remainLastBlockInterval ? width : 0;
var tickPixelPositions = _calculator2['default'].makeTickPixelPositions(width * sizeRatio, tickCount, 0, remainLastBlockIntervalPosition);

return tickPixelPositions[1] - tickPixelPositions[0];
};

/**
* Create position for optional line, when label axis.
* @param {number} width - width
* @param {object} xAxisData - x axis data
* @param {number} value - value
* @returns {number|null}
* @private
*/


Plot.prototype._createOptionalLinePositionWhenLabelAxis = function _createOptionalLinePositionWhenLabelAxis(width, value) {
Plot.prototype._createOptionalLinePositionWhenLabelAxis = function _createOptionalLinePositionWhenLabelAxis(width, xAxisData, value) {
var dataProcessor = this.dataProcessor;

var isLineTypeChart = _predicate2['default'].isLineTypeChart(dataProcessor.chartType, dataProcessor.seriesTypes);
var isPointOnColumn = isLineTypeChart && xAxisData.options.pointOnColumn;
var index = dataProcessor.findCategoryIndex(value);
var halfLabelDistance = this._calculateXAxisLabelDistance(width, xAxisData) / 2;

var position = null;
var ratio = void 0;

if (!_tuiCodeSnippet2['default'].isNull(index)) {
ratio = index === 0 ? 0 : index / (dataProcessor.getCategoryCount() - 1);
var categoryCount = dataProcessor.getCategoryCount();
var divCount = isPointOnColumn ? categoryCount : categoryCount - 1;

ratio = index === 0 ? 0 : index / divCount;

position = ratio * width;
if (isPointOnColumn) {
position += halfLabelDistance;
}
}

if (ratio === 1) {
endPosition = void 0;

if (xAxisData.isLabelAxis) {
startPosition = this._createOptionalLinePositionWhenLabelAxis(width, range[0]);
endPosition = this._createOptionalLinePositionWhenLabelAxis(width, range[1]);
startPosition = this._createOptionalLinePositionWhenLabelAxis(width, xAxisData, range[0]);
endPosition = this._createOptionalLinePositionWhenLabelAxis(width, xAxisData, range[1]);
} else {
startPosition = this._createOptionalLinePosition(xAxisData, width, range[0]);
endPosition = range[1] && this._createOptionalLinePosition(xAxisData, width, range[1]);

/**
* series data
* @type {Array.<object>}
* @type {object}
*/
this.seriesData = [];
this.seriesData = {};

/**
* Selected legend index
this.labelSet.remove();
}

this.seriesData = [];
this.seriesData = {};
};

/**
}
};

Series.prototype.isAvailableSeriesData = function isAvailableSeriesData() {
return !!(this.seriesData && this.seriesData.isAvailable && this.seriesData.isAvailable());
};

/**
* Return boolean value whether seriesData contains data
* @param {object} seriesData seriesData object


LineTypeSeriesBase.prototype.onHideGroupTooltipLine = function onHideGroupTooltipLine() {
if (!this.seriesData || !this.seriesData.isAvailable() || !this.graphRenderer.hideGroupTooltipLine) {
if (!this.isAvailableSeriesData() || !this.graphRenderer.hideGroupTooltipLine) {
return;
}
this.graphRenderer.hideGroupTooltipLine();
Oops, something went wrong.

0 comments on commit fa59bb1

Please sign in to comment.
You can’t perform that action at this time.