prepareCustom.js 646 B

12345678910111213141516171819202122232425262728
  1. var zrUtil = require("zrender/lib/core/util");
  2. function _default(coordSys) {
  3. var rect = coordSys.getRect();
  4. var rangeInfo = coordSys.getRangeInfo();
  5. return {
  6. coordSys: {
  7. type: 'calendar',
  8. x: rect.x,
  9. y: rect.y,
  10. width: rect.width,
  11. height: rect.height,
  12. cellWidth: coordSys.getCellWidth(),
  13. cellHeight: coordSys.getCellHeight(),
  14. rangeInfo: {
  15. start: rangeInfo.start,
  16. end: rangeInfo.end,
  17. weeks: rangeInfo.weeks,
  18. dayCount: rangeInfo.allDay
  19. }
  20. },
  21. api: {
  22. coord: zrUtil.bind(coordSys.dataToPoint, coordSys)
  23. }
  24. };
  25. }
  26. module.exports = _default;