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).

Methods

Global.setTheme(config)

Configure F2's charts style. For users to define their own style.

Parameters:

Example:

F2.Global.setTheme({
  colors: [ '#F04864', '#D66BCA', '#8543E0', '#8E77ED', '#3436C7', '#737EE6', '#223273', '#7EA2E6' ],
  pixelRatio: 2,
  guide: {
    line: {
      stroke: '#F04864',
      lineWidth: 2
    }
  }
});

Last updated