Type module
Sources
Items from Net can be imported/included and used via following ways.
/** * -------------------------------------------------------- * Import via main package: core.ts * Access items like: am4core.net.myVariable * am4core.net.myFunction() * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4"; /** * -------------------------------------------------------- * Import via: Net.ts * Access items like: $net.myVariable * $net.myFunction() * -------------------------------------------------------- */ import * as $net from "@amcharts/amcharts4/Net";
/** * -------------------------------------------------------- * Include via "core.js" * Access items like: am4core.net.myVariable * am4core.net.myFunction() * -------------------------------------------------------- */
Variables
Net does not have any variables.
Functions
|
load( url: ) |
Returns Loads an external file via its URL. Please note that this is an asynchronous function. It will not return the result, but rather a You can use the // Using await
let response = await Net.load( "http://www.my.com/data.json" );
console.log( response.response );
// Using then()
Net.load( "http://www.my.com/data.json" ).then( ( response ) => {
console.log( response.response );
} );
// Using then()
Net.load( "http://www.my.com/data.json" ).then( function( response ) {
console.log( response.response );
} );
@async |
|---|---|
|
readBlob( blob: ) |
Returns Returns textual representation of a Blob object. |