CandlestickSeries.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. /**
  20. * AUTO-GENERATED FILE. DO NOT MODIFY.
  21. */
  22. /*
  23. * Licensed to the Apache Software Foundation (ASF) under one
  24. * or more contributor license agreements. See the NOTICE file
  25. * distributed with this work for additional information
  26. * regarding copyright ownership. The ASF licenses this file
  27. * to you under the Apache License, Version 2.0 (the
  28. * "License"); you may not use this file except in compliance
  29. * with the License. You may obtain a copy of the License at
  30. *
  31. * http://www.apache.org/licenses/LICENSE-2.0
  32. *
  33. * Unless required by applicable law or agreed to in writing,
  34. * software distributed under the License is distributed on an
  35. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  36. * KIND, either express or implied. See the License for the
  37. * specific language governing permissions and limitations
  38. * under the License.
  39. */
  40. import { __extends } from "tslib";
  41. import SeriesModel from '../../model/Series.js';
  42. import { WhiskerBoxCommonMixin } from '../helper/whiskerBoxCommon.js';
  43. import { mixin } from 'zrender/lib/core/util.js';
  44. var CandlestickSeriesModel = /** @class */function (_super) {
  45. __extends(CandlestickSeriesModel, _super);
  46. function CandlestickSeriesModel() {
  47. var _this = _super !== null && _super.apply(this, arguments) || this;
  48. _this.type = CandlestickSeriesModel.type;
  49. _this.defaultValueDimensions = [{
  50. name: 'open',
  51. defaultTooltip: true
  52. }, {
  53. name: 'close',
  54. defaultTooltip: true
  55. }, {
  56. name: 'lowest',
  57. defaultTooltip: true
  58. }, {
  59. name: 'highest',
  60. defaultTooltip: true
  61. }];
  62. return _this;
  63. }
  64. /**
  65. * Get dimension for shadow in dataZoom
  66. * @return dimension name
  67. */
  68. CandlestickSeriesModel.prototype.getShadowDim = function () {
  69. return 'open';
  70. };
  71. CandlestickSeriesModel.prototype.brushSelector = function (dataIndex, data, selectors) {
  72. var itemLayout = data.getItemLayout(dataIndex);
  73. return itemLayout && selectors.rect(itemLayout.brushRect);
  74. };
  75. CandlestickSeriesModel.type = 'series.candlestick';
  76. CandlestickSeriesModel.dependencies = ['xAxis', 'yAxis', 'grid'];
  77. CandlestickSeriesModel.defaultOption = {
  78. // zlevel: 0,
  79. z: 2,
  80. coordinateSystem: 'cartesian2d',
  81. legendHoverLink: true,
  82. // xAxisIndex: 0,
  83. // yAxisIndex: 0,
  84. layout: null,
  85. clip: true,
  86. itemStyle: {
  87. color: '#eb5454',
  88. color0: '#47b262',
  89. borderColor: '#eb5454',
  90. borderColor0: '#47b262',
  91. borderColorDoji: null,
  92. // borderColor: '#d24040',
  93. // borderColor0: '#398f4f',
  94. borderWidth: 1
  95. },
  96. emphasis: {
  97. scale: true,
  98. itemStyle: {
  99. borderWidth: 2
  100. }
  101. },
  102. barMaxWidth: null,
  103. barMinWidth: null,
  104. barWidth: null,
  105. large: true,
  106. largeThreshold: 600,
  107. progressive: 3e3,
  108. progressiveThreshold: 1e4,
  109. progressiveChunkMode: 'mod',
  110. animationEasing: 'linear',
  111. animationDuration: 300
  112. };
  113. return CandlestickSeriesModel;
  114. }(SeriesModel);
  115. mixin(CandlestickSeriesModel, WhiskerBoxCommonMixin, true);
  116. export default CandlestickSeriesModel;