1. import * as echarts from 'echarts/core';

keys

  1. [
  2. 'Axis', 'ChartView', 'ComponentModel',
  3. 'ComponentView', 'List', 'Model',
  4. 'PRIORITY', 'SeriesModel', 'color',
  5. 'connect', 'dataTool', 'dependencies',
  6. 'disConnect', 'disconnect', 'dispose',
  7. 'env', 'extendChartView', 'extendComponentModel',
  8. 'extendComponentView', 'extendSeriesModel', 'format',
  9. 'getCoordinateSystemDimensions', 'getInstanceByDom', 'getInstanceById',
  10. 'getMap', 'graphic', 'helper',
  11. 'init', 'innerDrawElementOnCanvas', 'matrix',
  12. 'number', 'parseGeoJSON', 'parseGeoJson',
  13. 'registerAction', 'registerCoordinateSystem', 'registerLayout',
  14. 'registerLoading', 'registerLocale', 'registerMap',
  15. 'registerPostInit', 'registerPostUpdate', 'registerPreprocessor',
  16. 'registerProcessor', 'registerTheme', 'registerTransform',
  17. 'registerUpdateLifecycle', 'registerVisual', 'setCanvasCreator',
  18. 'throttle', 'time', 'use',
  19. 'util', 'vector', 'version',
  20. 'zrUtil', 'zrender'
  21. ]

echarts.number.parseDate(‘2020-06-01’)

返回时间戳 +echarts.number.parseDate(${year}-06-01)

案例:散点图日历
image.png
https://echarts.apache.org/examples/zh/editor.html?c=calendar-effectscatter

  1. // 返回 Date对象
  2. echarts.number.parseDate('2020-06-01')
  3. // 返回时间戳
  4. +echarts.number.parseDate(`${year}-06-01`)

echarts.format.formatTime

  1. echarts.format.formatTime('yyyy-MM-dd', time)