globalDefault.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var platform = ''; // Navigator not exists in node
  2. if (typeof navigator !== 'undefined') {
  3. platform = navigator.platform || '';
  4. }
  5. var _default = {
  6. // 全图默认背景
  7. // backgroundColor: 'rgba(0,0,0,0)',
  8. // https://dribbble.com/shots/1065960-Infographic-Pie-chart-visualization
  9. // color: ['#5793f3', '#d14a61', '#fd9c35', '#675bba', '#fec42c', '#dd4444', '#d4df5a', '#cd4870'],
  10. // 浅色
  11. // color: ['#bcd3bb', '#e88f70', '#edc1a5', '#9dc5c8', '#e1e8c8', '#7b7c68', '#e5b5b5', '#f0b489', '#928ea8', '#bda29a'],
  12. // color: ['#cc5664', '#9bd6ec', '#ea946e', '#8acaaa', '#f1ec64', '#ee8686', '#a48dc1', '#5da6bc', '#b9dcae'],
  13. // 深色
  14. color: ['#c23531', '#2f4554', '#61a0a8', '#d48265', '#91c7ae', '#749f83', '#ca8622', '#bda29a', '#6e7074', '#546570', '#c4ccd3'],
  15. // 默认需要 Grid 配置项
  16. // grid: {},
  17. // 主题,主题
  18. textStyle: {
  19. // color: '#000',
  20. // decoration: 'none',
  21. // PENDING
  22. fontFamily: platform.match(/^Win/) ? 'Microsoft YaHei' : 'sans-serif',
  23. // fontFamily: 'Arial, Verdana, sans-serif',
  24. fontSize: 12,
  25. fontStyle: 'normal',
  26. fontWeight: 'normal'
  27. },
  28. // http://blogs.adobe.com/webplatform/2014/02/24/using-blend-modes-in-html-canvas/
  29. // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
  30. // Default is source-over
  31. blendMode: null,
  32. animation: 'auto',
  33. animationDuration: 1000,
  34. animationDurationUpdate: 300,
  35. animationEasing: 'exponentialOut',
  36. animationEasingUpdate: 'cubicOut',
  37. animationThreshold: 2000,
  38. // Configuration for progressive/incremental rendering
  39. progressiveThreshold: 3000,
  40. progressive: 400,
  41. // Threshold of if use single hover layer to optimize.
  42. // It is recommended that `hoverLayerThreshold` is equivalent to or less than
  43. // `progressiveThreshold`, otherwise hover will cause restart of progressive,
  44. // which is unexpected.
  45. // see example <echarts/test/heatmap-large.html>.
  46. hoverLayerThreshold: 3000,
  47. // See: module:echarts/scale/Time
  48. useUTC: false
  49. };
  50. module.exports = _default;