GaugeSeries.js 5.0 KB

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