Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy hypergrid #5

Merged
merged 18 commits into from
Jan 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"lerna": "^2.5.1"
},
"scripts": {
"start": "lerna run start ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}}",
"start": "lerna run start ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"puppeteer": "docker run -it --rm --shm-size=2g -u root -e WRITE_TESTS=${WRITE_TESTS} -v $(pwd):/src -w /src/packages/${PACKAGE} zenato/puppeteer ./node_modules/.bin/jest --runInBand",
"postinstall": "lerna bootstrap --hoist",
"test": "npm run test_perspective && npm run test_viewer && npm run test_hypergrid && npm run test_highcharts",
Expand Down
7 changes: 3 additions & 4 deletions packages/perspective-common/common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ const plugins = []
if (!process.env.PSP_NO_MINIFY) {
plugins.push(new UglifyJSPlugin({
sourceMap: true,
uglifyOptions: {
sourceMap: true,
ecma: 5
output: {
ascii_only: true
}
}));
}
Expand Down Expand Up @@ -53,7 +52,7 @@ module.exports = function() {
loader: "babel-loader",
options: {
presets: ['env'],
plugins: ['transform-promise-to-bluebird', 'transform-async-to-bluebird', 'transform-runtime', ["transform-es2015-for-of", {
plugins: ['transform-runtime', ["transform-es2015-for-of", {
"loose": true
}]]
}
Expand Down
5 changes: 0 additions & 5 deletions packages/perspective-common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
*
*/

require('bluebird').config({
cancellation: true,
longStackTraces: false
});

/**
* Detect Internet Explorer.
*
Expand Down
3 changes: 0 additions & 3 deletions packages/perspective-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
"author": "",
"license": "Apache",
"dependencies": {
"bluebird": "^3.5.1",
"babel-runtime": "^6.26.0"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-async-to-bluebird": "^1.1.1",
"babel-plugin-transform-es2015-for-of": "^6.23.0",
"babel-plugin-transform-promise-to-bluebird": "^1.1.1",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-polyfill": "^6.26.0",
"babel-preset-env": "^1.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer-highcharts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@jpmorganchase/perspective-viewer-highcharts",
"version": "0.0.1",
"description": "Perspective.js",
"main": "src/js/highcharts.js",
"main": "build/highcharts.plugin.js",
"directories": {
"test": "test"
},
Expand Down
6 changes: 5 additions & 1 deletion packages/perspective-viewer-highcharts/src/js/highcharts.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,17 @@ function* visible_rows(json, hidden) {
}

export function draw(mode) {
return async function(el, view, hidden, redraw) {
return async function(el, view, hidden, redraw, task) {
var row_pivots = this._view_columns('#row_pivots perspective-row:not(.off)');
var col_pivots = this._view_columns('#column_pivots perspective-row:not(.off)');
var aggregates = this._get_view_aggregates();

let [js, schema] = await Promise.all([view.to_json(), view.schema()]);

if (task.cancelled) {
return;
}

let [series, top, colorRange] = _make_series.call(this, js, row_pivots, col_pivots, mode, hidden);

var colors = COLORS_20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"bar.html/pivots by a row.": "667024057e32ac7dcff85f714e991345",
"bar.html/pivots by two rows.": "38985a461a70412e91ba04ed08630f56",
"bar.html/pivots by a row and a column.": "d3c12fafa6aa6e48a65fb772633db007",
"bar.html/pivots by two rows and two columns.": "62d79c966449d7baeb024991038dbce9",
"bar.html/pivots by two rows and two columns.": "f8541acf149555a07db51b75fe25b3de",
"bar.html/sorts by a numeric column.": "89ca3dd689ac395e44e77520845055f4",
"bar.html/sorts by an alpha column.": "9116319b7b31aed9beba0632e474ddf0",
"line.html/shows a grid without any settings applied.": "5c7d75d2872635968019ef08bc505ff3",
"line.html/pivots by a row.": "a5c448c1f00f22657dae1ce3e059b075",
"line.html/pivots by two rows.": "1944115018252f8dceb03f84fab2ebf4",
"line.html/pivots by a row and a column.": "79c490c3f843b24af104b6681685b82f",
"line.html/pivots by two rows and two columns.": "76b7c6b1c0854e3fc295fb4ad2bc8e86",
"line.html/pivots by two rows and two columns.": "2199f0cb57cdab991f9a62c5c277e3b3",
"line.html/sorts by a numeric column.": "604f906365754839e95d0c7f01f15241",
"line.html/sorts by an alpha column.": "a9cf05d78de91c435055049ed538d1ad",
"line.html/displays visible columns.": "010890a5ebf5e4bd32557191a6b11c27",
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer-hypergrid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@jpmorganchase/perspective-viewer-hypergrid",
"version": "0.0.1",
"description": "Perspective.js",
"main": "src/js/hypergrid.js",
"main": "build/hypergrid.plugin.js",
"directories": {
"test": "test"
},
Expand Down
Loading