Skip to content

Commit

Permalink
[docs] Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
totallynotvaishnav committed Sep 3, 2022
1 parent 6f94d00 commit ebba2bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ NetJSON format used internally is based on [networkgraph](http://netjson.org/rfc

Whether to allow switching between graph and map render or not. You can also set it `true` to enable it.

- `maxPointsFetched`

**Default**: `10000`

The maximum number of nodes to fetch from the server.

- `dealDataByWorker`

The url to the worker file if you want to deal the data by a worker.
Expand Down Expand Up @@ -505,6 +511,11 @@ Demo is [here](https://openwisp.github.io/netjsongraph.js/examples/netjson-dateP

Parse JSONParam (string|object), return Promise object.

- `paginatedDataParse`

Parse paginated response from the server. It accepts `JSONParam` as a parameter. It uses cursor-based pagination by default. If you want to parse from the server that uses some other pagination logic, you can override this method using `setUtils`
method.

- `isObject`

Check if the param is object.
Expand Down
2 changes: 1 addition & 1 deletion dist/netjsongraph.min.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/js/netjsongraph.core.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class NetJSONGraph {
}

if (this.type === "netjson") {
JSONData.nodes.splice(
this.config.maxPointsFetched - 1,
JSONData.nodes.length - this.config.maxPointsFetched,
);
this.config.prepareData.call(this, JSONData);
}
this.data = JSONData;
Expand Down

0 comments on commit ebba2bf

Please sign in to comment.