Type class
Data Loader is responsible for loading and parsing external data.
There is just one instance of DataLoader per system. Unless you have a speicific reason, do not instantiate additional instances.
The global instance of Data Loader is accessible via:
am4core.dataLoader;
am4core.dataLoader;
A loading of specific data source is done via DataSource
.
Please refer to DataSource
for information how to use it.
IDataLoaderAdapters
for a list of available Adapters
Sources
DataLoader can be used (imported) via one of the following packages.
// DataLoader is available in all of the following modules. // You only need to import one of them. /** * -------------------------------------------------------- * Import from: "core.ts" * Use like: am4core.DataLoader * -------------------------------------------------------- */ import * as am4core from "@amcharts/amcharts4/core";
// DataLoader is available in all of the following modules. // You only need to import one of them. /** * -------------------------------------------------------- * Include via: <script src="core.js"></script> * Access items like: am4.DataLoader * -------------------------------------------------------- */
Inheritance
DataLoader does not extend any other symbol.
DataLoader is not extended by any other symbol.
Properties
adapter # |
Type Default Adapter. |
---|
Methods
getParserByData( data: ) |
Returns Tries to determine a parser out of content type and/or actual data. |
---|---|
getParserByType( contentType: ) |
Returns Instantiates a Built-in parser types are as follows:
|
load( source: ) |
Returns Loads a supplied |
Events
DataLoader does not have any events.
Adapters
#getParserByData |
Param { data: Applied after the Data Loader determines suitable parser type based on its data examination. |
---|---|
#getParserByType |
Param { parser: Applied after the Data Loader determines suitable parser type by data source's URL extension. |