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

docs: update installation guide #312

Merged
merged 1 commit into from
Nov 15, 2018
Merged

Conversation

ColinEberhardt
Copy link
Contributor

It looks like you need to load perspective.js in order to instantiate the 'engine':

const worker = perspective.worker();

It looks like you need to load perspective.js in order to instantiate the 'engine':

```
const worker = perspective.worker();
```
@texodus
Copy link
Member

texodus commented Nov 15, 2018

Thanks for the PR! Much appreciated.

To clarify, perspective.js is the API for the WebWorker. This is already a dependency of perspective.view.js, but this bundle does not expose it as a global variable; rather, it will internally create it's own WebWorker as needed to manage any data passed to it, which you can access via the <perspective-viewer>'s worker property like so

let elem = document.getElementById('my_viewer');
let table = elem.worker.table([{x:1, y:2}]);
elem.load(table);

Thus, perspective.js is only needed if you A) want to create additional WebWorkers or B) just want to use the Perspective engine library directly. We could alternatively just export the perspective symbol globally from perspective.view.js - feedback welcome here. Either way, this part of the documentation needs some substantial fleshing out!

@texodus texodus merged commit 90ebf55 into finos:master Nov 15, 2018
@ColinEberhardt
Copy link
Contributor Author

ColinEberhardt commented Nov 15, 2018

Thanks for merging the PR.

Either way, this part of the documentation needs some substantial fleshing out!

Your API documentation is really quite good. What you are lacking is any 'getting started' type of documentation. These are typically much more tutorial-based.

For our d3fc library we have a simple step-by-step guide here:

https://d3fc.io/introduction/building-a-chart.html

And a more advanced version as a blog post:

https://blog.scottlogic.com/2018/09/21/d3-financial-chart.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants