5.2.9 • Published 3 years ago

@eo4geo/bok-dataviz v5.2.9

Weekly downloads
42
License
MIT
Repository
github
Last release
3 years ago

EO4GEO-bok-dataviz

EO4GEO-bok-dataviz is an script to parse EO4GEO BoK and visualize it in a circle packing d3 layout.

Installation

Using npm:

npm i @eo4geo/bok-dataviz

Using bundle:

  • Donwload bundle.js and index.html from releases to see a minimim working example.

Usage

Place a div and give it an id. If you want to show also the textual information, place a div and give it an id.

<div id="bubbles"> </div>
<div id="textInfo"></div>

In Javascript call the function visualizeBOKData( svgID, textID)

  • svgID : is the id you gave to the element in the HTML you want to display the graph
  • textID : is the id you gave to the div for the textual information
import * as bok from '@eo4geo/bok-dataviz';
[...]
bok.visualizeBOKData('#bubbles') // will only render the graphical view

bok.visualizeBOKData('#bubbles', '#textInfo') // will render the graphical view and the textual view

Other functions

import * as bok from '@eo4geo/bok-dataviz'; // no need if using bundle.js
[...]
// returns an array of concepts matching the searchText string
selectedNodes = bok.searchInBoK(searchText); 
// navigates to the concept specified
bok.browseToConcept(conceptShortName); 
// returns the current node selected in the graph
bok..getCurrentNode(); 

Examples

selectedNodes = bok.searchInBoK('Analytics');
bok.browseToConcept('GIST'); // navigates to root concept
bok.browseToConcept('AM'); // navigates to Analytical Methods concept
console.log(bok..getCurrentNode()); // will print to the console current node
5.2.9

3 years ago

5.2.8

3 years ago

5.2.7

3 years ago

5.2.6

3 years ago

5.2.5

4 years ago

5.2.4

4 years ago

5.2.3

4 years ago

5.2.2

4 years ago

5.2.1

4 years ago

5.2.0

4 years ago

5.1.0

4 years ago

5.0.0

4 years ago

4.7.0

4 years ago

4.6.0

4 years ago

4.5.0

4 years ago

4.4.0

4 years ago

4.1.0

4 years ago

4.0.0

4 years ago

4.2.0

4 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago