graph » scale-x » transform

transform

[ root » graph » scaleX » transform ]

Time-Series Charts Only: Use the transform object to convert Unix timestamps into a more readable format. ZingChart accepts Unix time values in milliseconds, and timestamps can be calculated with online conversion tools such as Epoch Converter.


all (String)

To format your date values. Use this attribute with the type value (set to true).

TokenDescription
%ADisplays the ante or post meridiem time in upper case letters: AM or PM.
%aDisplays the ante or post meridiem time in lower case letters: am or pm.
%DDisplays the day of the week in abbreviated form: Sun, Mon, Tue, Wed, Thu, Fri and Sat.
%dDisplays the day's date without a leading 0 if the date is single digit.
%ddDisplays the day's date with a leading 0 if the date is single digit.
%GDisplays the hour in 24-hour format without a leading 0.
%gDisplays the hour in 12-hour format without a leading 0.
%HDisplays the hour in 24-hour format with a leading 0 if the hour is single digit.
%hDisplays the hour in 12-hour format with a leading 0 if the hour is single digit.
%iDisplays the minutes.
%MDisplays the month in abbreviated form: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov and Dec.
%mDisplays the month numerically without a leading 0 if the date is single digit.
%mmDisplay the month numerically with a leading 0 if the month is single digit.
%qDisplays the milliseconds.
%sDisplays the seconds.
%YDisplays the year in 4-digit format.
%yDisplays the year in 2-digit format.

'%M' | '%M %d' | '%M %d %H:%i' | ...



AttributeTypeDescription
allStringFormats date values when `type: "date"`.
Default Value: null
textStringSets the text of the scale label. If `type: "date"` is set within same object, date-related tokens (%M, %d, ...) can be used in this attribute.
Default Value: null
typeStringSet to "date" to convert Unix timestamps into dates.
Accepted Values: ['date']
Default Value: null
uniformBooleanTo set the time-series scale to linear (uniform) or non-linear.
Default Value: null