/ui/utils/jsonDataview
The jsonDataview module exports as default an object with a create method for JSON dataviews.
- Source
Requires
Methods
(inner) create(dataview)
The create method for json dataviews assigns the setData method to the dataview object.
Parameters:
Name | Type | Description |
---|---|---|
dataview | dataview | Dataview object. |
- Source
(inner) jsonfile(dataview) → {HTMLElement}
The button method creates a button element.
The button will call the textFile utility method to create a json file download.
Parameters:
Name | Type | Description |
---|---|---|
dataview | dataview | Dataview object. |
- Source
Returns:
Returns the button element.
- Type:
- HTMLElement
(inner) setData(data)
The [json] dataview setData method sets the stringified JSON data as textcontent of the dataview.target element.
Parameters:
Name | Type | Description |
---|---|---|
data | Object | JSON data. |
- Source