Package smile.plot.vega
Class FormatConfig
java.lang.Object
smile.plot.vega.FormatConfig
These config properties define the default number and time formats
for text marks as well as axes, headers, tooltip, and legends.
-
Method Summary
Modifier and TypeMethodDescriptioncustomFormatTypes
(boolean flag) Allow the formatType property for text marks and guides to accept a custom formatter function registered as a Vega expression.normalizedNumberFormat
(String format) Sets custom normalized number format.normalizedNumberFormatType
(String formatType) Sets custom normalized number format type.numberFormat
(String format) Sets custom number format.numberFormatType
(String formatType) Sets custom number format type.timeFormat
(String format) Sets custom time format.timeFormatType
(String formatType) Sets custom time format type.Returns the specification in pretty print.toString()
-
Method Details
-
toString
-
toPrettyString
Returns the specification in pretty print.- Returns:
- the specification in pretty print.
-
numberFormat
Sets custom number format.- Parameters:
format
- custom number format.- Returns:
- this object.
-
numberFormatType
Sets custom number format type.- Parameters:
formatType
- custom number format type.- Returns:
- this object.
-
normalizedNumberFormat
Sets custom normalized number format.- Parameters:
format
- custom normalized number format.- Returns:
- this object.
-
normalizedNumberFormatType
Sets custom normalized number format type.- Parameters:
formatType
- custom normalized number format type.- Returns:
- this object.
-
timeFormat
Sets custom time format.- Parameters:
format
- the custom time format.- Returns:
- this object.
-
timeFormatType
Sets custom time format type.- Parameters:
formatType
- the custom time format type.- Returns:
- this object.
-
customFormatTypes
Allow the formatType property for text marks and guides to accept a custom formatter function registered as a Vega expression.- Parameters:
flag
- true if accepting custom format types.- Returns:
- this object.
-