HOME


Mini Shell 1.0
DIR:/home/drsekaran/public_html/admin/vendors/echarts/src/layout/
Upload File :
Current File : /home/drsekaran/public_html/admin/vendors/echarts/src/layout/points.js
define(function (require) {

    return function (seriesType, ecModel, api) {
        ecModel.eachSeriesByType(seriesType, function (seriesModel) {
            var data = seriesModel.getData();
            var coordSys = seriesModel.coordinateSystem;

            if (coordSys) {
                var dims = coordSys.dimensions;
                data.each(dims, function (x, y, idx) {
                    var point;
                    if (!isNaN(x) && !isNaN(y)) {
                        point = coordSys.dataToPoint([x, y]);
                    }
                    else {
                        // Also {Array.<number>}, not undefined to avoid if...else... statement
                        point = [NaN, NaN];
                    }

                    data.setItemLayout(idx, point);
                }, true);
            }
        });
    };
});