LoadOptions
Options for loading data.
Properties
data?
optionaldata:any
Optional. JSON data to load directly.
dataType?
optionaldataType:string
Optional dataType to pass in the request
error()?
optionalerror: (e,status?) =>any
Optional function to call on load error.
Parameters
e
any
status?
any
Returns
any
headers?
optionalheaders:Record<string,string>
Optional map of HTTP header values, if loading via URL.
incremental?
optionalincremental:boolean
By default the model's load method is incremental, meaning it does not clear itself when loading new data. Set this flag to false if you want the model to call clear() after parsing the data (either passed in directly or having been retrieved from a url) and before loading it.
jsonp?
optionaljsonp:boolean
Optional, defaults to false. Tells VisuallyJs that the data is coming via JSON-P.
onload?
optionalonload:Function
Optional callback to execute once the data has loaded. Most often used when you are retrieving remote data (using url)
parameters?
optionalparameters:Record<string,any>
Optional parameters to pass to the loader.
type?
optionaltype:string
Specifies the data type of the data to load. Defaults to json. This must match the name of a loader registered with the given instance of VisuallyJs.
url?
optionalurl:string
URL to retrieve data from. Optional, but you need to supply either this or data.