Type module
Sources
Items from Net can be imported/included and used via following ways.
/** * -------------------------------------------------------- * Import via main package: core.ts * Access items like: am5.net.myVariable * am5.net.myFunction() * -------------------------------------------------------- */ import * as am5 from "@amcharts/amcharts5"; /** * -------------------------------------------------------- * Import via: Net.ts * Access items like: $net.myVariable * $net.myFunction() * -------------------------------------------------------- */ import * as $net from "@amcharts/amcharts5/Net";
/** * -------------------------------------------------------- * Include via "index.js" * E.g.: "https://cdn.amcharts.com/lib/5/index.js" * Access items like: am5.net.myVariable * am5.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. |