GaugeSeries.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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. },
  130. pointer: {
  131. icon: null,
  132. offsetCenter: [0, 0],
  133. show: true,
  134. showAbove: true,
  135. length: '60%',
  136. width: 6,
  137. keepAspect: false
  138. },
  139. anchor: {
  140. show: false,
  141. showAbove: false,
  142. size: 6,
  143. icon: 'circle',
  144. offsetCenter: [0, 0],
  145. keepAspect: false,
  146. itemStyle: {
  147. color: '#fff',
  148. borderWidth: 0,
  149. borderColor: '#5470c6'
  150. }
  151. },
  152. title: {
  153. show: true,
  154. // x, y,单位px
  155. offsetCenter: [0, '20%'],
  156. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  157. color: '#464646',
  158. fontSize: 16,
  159. valueAnimation: false
  160. },
  161. detail: {
  162. show: true,
  163. backgroundColor: 'rgba(0,0,0,0)',
  164. borderWidth: 0,
  165. borderColor: '#ccc',
  166. width: 100,
  167. height: null,
  168. padding: [5, 10],
  169. // x, y,单位px
  170. offsetCenter: [0, '40%'],
  171. // formatter: null,
  172. // 其余属性默认使用全局文本样式,详见TEXTSTYLE
  173. color: '#464646',
  174. fontSize: 30,
  175. fontWeight: 'bold',
  176. lineHeight: 30,
  177. valueAnimation: false
  178. }
  179. };
  180. return GaugeSeriesModel;
  181. }(SeriesModel);
  182. export default GaugeSeriesModel;