Skip to content

Commit 16b44f8

Browse files
authored
Merge pull request #86 from jpmorganchase/more-highcharts-modes
More highcharts modes
2 parents ee7de2a + 7b95f21 commit 16b44f8

File tree

14 files changed

+305
-127
lines changed

14 files changed

+305
-127
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ application - these modules export nothing, but rather register the components
250250
for use within your site's regular HTML:
251251

252252
```javascript
253-
import "perspective-viewer";
254-
import "perspective-viewer-hypergrid";
255-
import "perspective-viewer-highcharts";
253+
import "@jpmorganchase/perspective-viewer";
254+
import "@jpmorganchase/perspective-viewer-hypergrid";
255+
import "@jpmorganchase/perspective-viewer-highcharts";
256256
```
257257

258258
Alternatively, you can just import the pre-bundled assets from the relevant NPM

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"scripts": {
66
"start": "lerna run start ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
77
"travis_start": "lerna run start ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream && lerna run compile_test --stream",
8-
"puppeteer": "docker run -it --rm --shm-size=2g -u root -e WRITE_TESTS=${WRITE_TESTS} -v $(pwd):/src -w /src/packages/${PACKAGE} perspective/puppeteer ./node_modules/.bin/jest --silent",
8+
"puppeteer": "docker run -it --rm --shm-size=2g -u root -e WRITE_TESTS=${WRITE_TESTS} -v $(pwd):/src -w /src/packages/${PACKAGE} perspective/puppeteer ./node_modules/.bin/jest --silent --runInBand",
99
"postinstall": "lerna bootstrap --hoist",
1010
"test": "lerna run compile_test --stream && npm run test_perspective && npm run test_viewer && npm run test_hypergrid && npm run test_highcharts",
1111
"test_perspective": "PACKAGE=perspective npm run puppeteer",

packages/perspective-common/index.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,19 @@ export function ScriptPath() {
8989
}
9090
pathParts = stackLines[callerIndex].match(/((http[s]?:\/\/.+\/)([^\/]+\.(js|html))).*?:/);
9191
}
92+
9293
this.fullPath = function() {
93-
return pathParts[1];
94+
return pathParts ? pathParts[1] : window.location.origin + window.location.pathname;
9495
};
9596
this.path = function() {
96-
return pathParts[2];
97+
return pathParts ? pathParts[2] : window.location.pathname;
9798
};
9899
this.host = function() {
99-
return this.path().match(/.+?\/\/.+?\//)[0];
100+
let x = this.path().match(/.+?\/\/.+?\//);
101+
return x ? x[0] : window.location.hostname;
100102
}
101103
this.file = function() {
102-
return pathParts[3];
104+
return pathParts ? pathParts[3] : "";
103105
};
104106
}
105107

packages/perspective-viewer-highcharts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@jpmorganchase/perspective-common": "^0.1.6",
3737
"babel-runtime": "^6.26.0",
3838
"chroma-js": "^1.3.4",
39-
"highcharts": "5.0.14",
39+
"highcharts": "6.0.7",
4040
"highcharts-grouped-categories": "1.1.2",
4141
"highcharts-more": "^0.1.2"
4242
},

packages/perspective-viewer-highcharts/src/js/heatmap.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import highcharts from 'highcharts';
1111
import highchartsMore from 'highcharts-more';
1212
import heatmap from 'highcharts/modules/heatmap';
1313
import boost from 'highcharts/modules/boost';
14+
import treemap from 'highcharts/modules/treemap';
1415
import grouped_categories from 'highcharts-grouped-categories';
1516
import chroma from 'chroma-js';
1617

@@ -27,6 +28,7 @@ let axisProto = Highcharts.Axis.prototype,
2728

2829
highchartsMore(highcharts);
2930
heatmap(highcharts);
31+
treemap(highcharts);
3032
grouped_categories(highcharts);
3133
boost(highcharts);
3234

0 commit comments

Comments
 (0)