Skip to content

docs: update installation guide#312

Merged
texodus merged 1 commit intoperspective-dev:masterfrom
ColinEberhardt:patch-1
Nov 15, 2018
Merged

docs: update installation guide#312
texodus merged 1 commit intoperspective-dev:masterfrom
ColinEberhardt:patch-1

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 perspective-dev: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

Development

Successfully merging this pull request may close these issues.

2 participants