GaugeSeries.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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 createSeriesDataSimply from '../helper/createSeriesDataSimply.js';
  42. import SeriesModel from '../../model/Series.js';
  43. var GaugeSeriesModel =
  44. /** @class */
  45. function (_super) {
  46. __extends(GaugeSeriesModel, _super);
  47. function GaugeSeriesModel() {
  48. var _this = _super !== null && _super.apply(this, arguments) || this;
  49. _this.type = GaugeSeriesModel.type;
  50. _this.visualStyleAccessPath = 'itemStyle';
  51. return _this;
  52. }
  53. GaugeSeriesModel.prototype.getInitialData = function (option, ecModel) {
  54. return createSeriesDataSimply(this, ['value']);
  55. };
  56. GaugeSeriesModel.type = 'series.gauge';
  57. GaugeSeriesModel.defaultOption = {
  58. // zlevel: 0,
  59. z: 2,
  60. colorBy: 'data',
  61. // 默认全局居中
  62. center: ['50%', '50%'],
  63. legendHoverLink: true,
  64. radius: '75%',
  65. startAngle: 225,
  66. endAngle: -45,
  67. clockwise: true,
  68. // 最小值
  69. min: 0,
  70. // 最大值
  71. max: 100,
  72. // 分割段数,默认为10
  73. splitNumber: 10,
  74. // 坐标轴线
  75. axisLine: {
  76. // 默认显示,属性show控制显示与否
  77. show: true,
  78. roundCap: false,
  79. lineStyle: {
  80. color: [[1, '#E6EBF8']],
  81. width: 10
  82. }
  83. },
  84. // 坐标轴线
  85. progress: {
  86. // 默认显示,属性show控制显示与否
  87. show: false,
  88. overlap: true,
  89. width: 10,
  90. roundCap: false,
  91. clip: true
  92. },
  93. // 分隔线
  94. splitLine: {
  95. // 默认显示,属性show控制显示与否
  96. show: true,
  97. // 属性length控制线长
  98. length: 10,
  99. distance: 10,
  100. // 属性lineStyle(详见lineStyle)控制线条样式
  101. lineStyle: {
  102. color: '#63677A',
  103. width: 3,
  104. type: 'solid'
  105. }
  106. },
  107. // 坐标轴小标记
  108. axisTick: {
  109. // 属性show控制显示与否,默认不显示
  110. show: true,
  111. // 每份split细分多少段
  112. splitNumber: 5,
  113. // 属性length控制线长
  114. length: 6,
  115. distance: 10,
  116. // 属性lineStyle控制线条样式
  117. lineStyle: {
  118. color: '#63677A',
  119. width: 1,
  120. type: 'solid'
  121. }
  122. },
  123. axisLabel: {
  124. show: true,
  125. distance: 15,
  126. // formatter: null,
  127. color: '#464646',
  128. fontSize: 12,
  129. rotate: 0
  130. },
  131. pointer: {
  132. icon: null,
  133. offsetCenter: [0, 0],
  134. show: true,
  135. showAbove: true,
  136. length: '60%',
  137. width: 6,
  138. keepAspect: false
  139. },
  140. anchor: {
  141. show: false,
  142. showAbove: false,
  143. size: 6,
  144. icon: 'circle',
  145. offsetCenter: [0, 0],
  146. keepAspect: false,
  147. itemStyle: {
  148. color: '#fff',
  149. borderWidth: 0,
  150. borderColor: '#5470c6'
  151. }
  152. },
  153. title: {
  154. show: true,
  155. // x, y,单位px
  156. offsetCenter: [0, '20%'],
  157. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  158. color: '#464646',
  159. fontSize: 16,
  160. valueAnimation: false
  161. },
  162. detail: {
  163. show: true,
  164. backgroundColor: 'rgba(0,0,0,0)',
  165. borderWidth: 0,
  166. borderColor: '#ccc',
  167. width: 100,
  168. height: null,
  169. padding: [5, 10],
  170. // x, y,单位px
  171. offsetCenter: [0, '40%'],
  172. // formatter: null,
  173. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  174. color: '#464646',
  175. fontSize: 30,
  176. fontWeight: 'bold',
  177. lineHeight: 30,
  178. valueAnimation: false
  179. }
  180. };
  181. return GaugeSeriesModel;
  182. }(SeriesModel);
  183. export default GaugeSeriesModel;