Description
Converts an array of moments into a new array of Json objects that represents a data series.
Data series arrays can be displayed in visual plots via app.plot and ai.insights.plot.
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
array | Any | Yes | Array of moments |
[format] | Text | No | DateTime format specifier for labels |
Returns
Type: Array (of Json objects)
Returns a new array of Json objects. Each object in the returned array will have two properties: label and value.
DateTime Formats
Below is a collection of popular DateTime format value. Additional formatters are supported and can be found here.
Format | Description |
---|---|
MMMM | December (default) |
MMM | Dec |
MM | 12 |
M | December 25 |
dddd | Tuesday |
ddd | Tue |
dd | 25 |
d | 12/25/2019 |
yyyy | 2019 |
yy | 19 |
y | December 2019 |
MM/dd/yyyy | 12/25/2019 |
Examples
Remarks
Use this function when you want to plot moments returned from avatar.get via app.plot and ai.insights.plot.