globalDefault.js 2.2 KB

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