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

More highcharts modes #86

Merged
merged 8 commits into from
Apr 5, 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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ application - these modules export nothing, but rather register the components
for use within your site's regular HTML:

```javascript
import "perspective-viewer";
import "perspective-viewer-hypergrid";
import "perspective-viewer-highcharts";
import "@jpmorganchase/perspective-viewer";
import "@jpmorganchase/perspective-viewer-hypergrid";
import "@jpmorganchase/perspective-viewer-highcharts";
```

Alternatively, you can just import the pre-bundled assets from the relevant NPM
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"start": "lerna run start ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream",
"travis_start": "lerna run start ${PACKAGE:+--scope=@jpmorganchase/${PACKAGE}} --stream && lerna run compile_test --stream",
"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",
"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",
"postinstall": "lerna bootstrap --hoist",
"test": "lerna run compile_test --stream && npm run test_perspective && npm run test_viewer && npm run test_hypergrid && npm run test_highcharts",
"test_perspective": "PACKAGE=perspective npm run puppeteer",
Expand Down
10 changes: 6 additions & 4 deletions packages/perspective-common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,19 @@ export function ScriptPath() {
}
pathParts = stackLines[callerIndex].match(/((http[s]?:\/\/.+\/)([^\/]+\.(js|html))).*?:/);
}

this.fullPath = function() {
return pathParts[1];
return pathParts ? pathParts[1] : window.location.origin + window.location.pathname;
};
this.path = function() {
return pathParts[2];
return pathParts ? pathParts[2] : window.location.pathname;
};
this.host = function() {
return this.path().match(/.+?\/\/.+?\//)[0];
let x = this.path().match(/.+?\/\/.+?\//);
return x ? x[0] : window.location.hostname;
}
this.file = function() {
return pathParts[3];
return pathParts ? pathParts[3] : "";
};
}

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 @@ -36,7 +36,7 @@
"@jpmorganchase/perspective-common": "^0.1.6",
"babel-runtime": "^6.26.0",
"chroma-js": "^1.3.4",
"highcharts": "5.0.14",
"highcharts": "6.0.7",
"highcharts-grouped-categories": "1.1.2",
"highcharts-more": "^0.1.2"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/perspective-viewer-highcharts/src/js/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import highcharts from 'highcharts';
import highchartsMore from 'highcharts-more';
import heatmap from 'highcharts/modules/heatmap';
import boost from 'highcharts/modules/boost';
import treemap from 'highcharts/modules/treemap';
import grouped_categories from 'highcharts-grouped-categories';
import chroma from 'chroma-js';

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

highchartsMore(highcharts);
heatmap(highcharts);
treemap(highcharts);
grouped_categories(highcharts);
boost(highcharts);

Expand Down
Loading