Global
F2.Global
F2.Global
is the global configuration in F2, it contains following attributes:
We can get the default value of an attribute by console.log(F2.Global)
.
Name | Type | Description |
| Array / Number | the spacing between the chart plot area and the canvas border. See here. Default value is 'auto'. |
| Array / Number | The reserved spacing on the four sides of the chart canvas area. See here. |
| Object | The default configuration for different types of axes. |
| Array | The default color series. |
| String | The default color. |
| String | The default font family. |
| Object | The default configuration for different types of guides. |
| Object | The default configuration for different type of legends. |
| Array | The default setting for |
| Number | The default pixel ratio. |
| Object | The default style configuration for different shapes. |
| Array | The default size range for size mapping. |
| Object | The default tooltip configuration for tooltip. |
| String | The current version of F2. |
| Object | ratio of width for different shapes. |
Methods
Global.setTheme(config)
Global.setTheme(config)
Configure F2's charts style. For users to define their own style.
Parameters:
Name | Type | Description |
| Object | theme configuration |
Example:
Last updated