提交 3c245648 编写于 作者: P pissang

Naming: List#indexOfNearest to List#indicesOfNearest

上级 7792a0ee
......@@ -146,7 +146,7 @@ define(function(require) {
seriesNestestValue = result.nestestValue;
}
else {
dataIndices = series.getData().indexOfNearest(
dataIndices = series.getData().indicesOfNearest(
dataDim[0],
value,
// Add a threshold to avoid find the wrong dataIndex
......
......@@ -33,7 +33,7 @@ define(function (require) {
var coordArr = [];
var value = numCalculate(data, targetDataDim, mlType);
var dataIndex = data.indexOfNearest(targetDataDim, value, true)[0];
var dataIndex = data.indicesOfNearest(targetDataDim, value, true)[0];
coordArr[otherCoordIndex] = data.get(otherDataDim, dataIndex, true);
coordArr[targetCoordIndex] = data.get(targetDataDim, dataIndex, true);
......
......@@ -549,7 +549,7 @@ define(function (require) {
* @param {number} [maxDistance=Infinity]
* @return {Array.<number>} Considere multiple points has the same value.
*/
listProto.indexOfNearest = function (dim, value, stack, maxDistance) {
listProto.indicesOfNearest = function (dim, value, stack, maxDistance) {
var storage = this._storage;
var dimData = storage[dim];
var nearestIndices = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册