ParallelAxis.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. var zrUtil = require("zrender/lib/core/util");
  2. var Axis = require("../Axis");
  3. /**
  4. * @constructor module:echarts/coord/parallel/ParallelAxis
  5. * @extends {module:echarts/coord/Axis}
  6. * @param {string} dim
  7. * @param {*} scale
  8. * @param {Array.<number>} coordExtent
  9. * @param {string} axisType
  10. */
  11. var ParallelAxis = function (dim, scale, coordExtent, axisType, axisIndex) {
  12. Axis.call(this, dim, scale, coordExtent);
  13. /**
  14. * Axis type
  15. * - 'category'
  16. * - 'value'
  17. * - 'time'
  18. * - 'log'
  19. * @type {string}
  20. */
  21. this.type = axisType || 'value';
  22. /**
  23. * @type {number}
  24. * @readOnly
  25. */
  26. this.axisIndex = axisIndex;
  27. };
  28. ParallelAxis.prototype = {
  29. constructor: ParallelAxis,
  30. /**
  31. * Axis model
  32. * @param {module:echarts/coord/parallel/AxisModel}
  33. */
  34. model: null,
  35. /**
  36. * @override
  37. */
  38. isHorizontal: function () {
  39. return this.coordinateSystem.getModel().get('layout') !== 'horizontal';
  40. }
  41. };
  42. zrUtil.inherits(ParallelAxis, Axis);
  43. var _default = ParallelAxis;
  44. module.exports = _default;