sap.ui.core.format.NumberFormat
.The bottom labels are formatted by the number or date formatter depending on the dimensions property's type and its annotations:
Types of dimensions Property |
Annotations |
Raw Value |
X-coordinate Value |
Formatted Value for Bottom Label |
---|---|---|---|---|
Any type |
|
"any text" (raw value of |
Depends on property type (use index value if neither date nor number type is present) |
'any text' |
Edm.String |
|
2016 |
Timestamp |
1/1/16 |
Edm.String |
|
201612 |
Timestamp |
12/1/16 |
Edm.String |
|
20161225 |
Timestamp |
12/25/16 |
|
--- |
'any text' |
Indices |
|
Edm.DateTime |
|
/Date(1472629368000)/ |
Timestamp |
8/31/16 |
Edm.Int32 or other number types |
|
20000 |
20000 |
20K |
If the dimensions
property has an OData V2 annotation
sap:text
(or an ODataV4 annotation
Common.Text
) pointing to another property, that property's
value is used to display the bottom label, no matter what the primary property's
data type is. The x-coordinate's value depends on the primary property's data
type. If its type is DateTime
, the date is converted to a
timestamp; if it has a numeric type, the value is used directly. In other cases,
each point's index from within the data list is used, causing an even
distribution of points on the x-axis.
dimensions
property is string
and it has
an OData V2 annotation sap:semantics
(or the OData V4 annotation
IsCalendarYear
, or similar), the raw value is formatted to a
shortened date string based on the pattern provided by
sap:semantics
(or a corresponding pattern of
IsCalendarYear
). The value of the x-coordinate is set to the
formatted date's timestamp. The bottom label displays the formatted short date.dimensions
property is DateTime
or
another numeric type without any of the annotations mentioned above, the raw value
is formatted by the number formatter or date formatter depending on the data type.
Each point's x-coordinate value is set to the date's timestamp representation if its
type is DateTime
, and to a numeric value if its type is
numeric.