Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc3807b

Browse files
committed
get rid of _index
1 parent 87710e2 commit bc3807b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/core/core.datasetController.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ helpers.extend(DatasetController.prototype, {
441441

442442
for (i = 0, ilen = parsed.length; i < ilen; ++i) {
443443
item = parsed[i];
444-
meta.data[item._index]._parsed = item;
444+
meta.data[start + i]._parsed = item;
445445

446446
if (stacks) {
447447
item._stackKeys = {};
@@ -467,7 +467,7 @@ helpers.extend(DatasetController.prototype, {
467467
* @param {number} count - number of items to parse
468468
* @returns {object} parsed item - item containing index and a parsed value
469469
* for each scale id.
470-
* Example: {index: 1, xScale0: 0, yScale0: 1}
470+
* Example: {xScale0: 0, yScale0: 1}
471471
* @private
472472
*/
473473
_parsePrimitiveData: function(meta, data, start, count) {
@@ -479,7 +479,7 @@ helpers.extend(DatasetController.prototype, {
479479
var i, ilen, item;
480480

481481
for (i = start, ilen = start + count; i < ilen; ++i) {
482-
item = {_index: i};
482+
item = {};
483483
item[iScale.id] = singleScale || iScale._parse(labels[i], i);
484484
item[vScale.id] = vScale._parse(data[i], i);
485485
parsed.push(item);
@@ -495,7 +495,7 @@ helpers.extend(DatasetController.prototype, {
495495
* @param {number} count - number of items to parse
496496
* @returns {object} parsed item - item containing index and a parsed value
497497
* for each scale id.
498-
* Example: {index: 1, xScale0: 0, yScale0: 1}
498+
* Example: {xScale0: 0, yScale0: 1}
499499
* @private
500500
*/
501501
_parseArrayData: function(meta, data, start, count) {
@@ -505,7 +505,7 @@ helpers.extend(DatasetController.prototype, {
505505
var i, ilen, item, arr;
506506
for (i = start, ilen = start + count; i < ilen; ++i) {
507507
arr = data[i];
508-
item = {_index: i};
508+
item = {};
509509
item[xScale.id] = xScale._parse(arr[0], i);
510510
item[yScale.id] = yScale._parse(arr[1], i);
511511
parsed.push(item);
@@ -521,7 +521,7 @@ helpers.extend(DatasetController.prototype, {
521521
* @param {number} count - number of items to parse
522522
* @returns {object} parsed item - item containing index and a parsed value
523523
* for each scale id. _custom is optional
524-
* Example: {index: 1, xScale0: 0, yScale0: 1, _custom: {r: 10, foo: 'bar'}}
524+
* Example: {xScale0: 0, yScale0: 1, _custom: {r: 10, foo: 'bar'}}
525525
* @private
526526
*/
527527
_parseObjectData: function(meta, data, start, count) {
@@ -531,7 +531,7 @@ helpers.extend(DatasetController.prototype, {
531531
var i, ilen, item, obj;
532532
for (i = start, ilen = start + count; i < ilen; ++i) {
533533
obj = data[i];
534-
item = {_index: i};
534+
item = {};
535535
item[xScale.id] = xScale._parseObject(obj, 'x', i);
536536
item[yScale.id] = yScale._parseObject(obj, 'y', i);
537537
parsed.push(item);

0 commit comments

Comments
 (0)