var MAX = 1000;
var bt = [122, 437, 981,643];
var colors = [];
for (var i = 0; i < bt.length; ++i) {
colors[i] = getColor(bt[i], MAX);
}
console.log(colors);
require 'vendor/autoload.php';
$xls = new PHPExcel();
$xls->setActiveSheetIndex(0);
$sheet = $xls->getActiveSheet();
$sheet->setTitle('EXCEL');
$sheet->setCellValue("A1", 'TEXT');
$sheet->getStyle('A1')->getAlignment()->setHorizontal(
PHPExcel_Style_Alignment::HORIZONTAL_CENTER
);
$output = new PHPExcel_Writer_Excel5($xls);
$output->save("FILE.xls");
onStatusChange
. Но из js нельзя передать все что угодно, толкоcom.facebook.react.bridge.Callback
.