SliderZoomModel.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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 DataZoomModel from './DataZoomModel.js';
  42. import { inheritDefaultOption } from '../../util/component.js';
  43. import tokens from '../../visual/tokens.js';
  44. var SliderZoomModel = /** @class */function (_super) {
  45. __extends(SliderZoomModel, _super);
  46. function SliderZoomModel() {
  47. var _this = _super !== null && _super.apply(this, arguments) || this;
  48. _this.type = SliderZoomModel.type;
  49. return _this;
  50. }
  51. SliderZoomModel.type = 'dataZoom.slider';
  52. SliderZoomModel.layoutMode = 'box';
  53. SliderZoomModel.defaultOption = inheritDefaultOption(DataZoomModel.defaultOption, {
  54. show: true,
  55. // deault value can only be drived in view stage.
  56. right: 'ph',
  57. top: 'ph',
  58. width: 'ph',
  59. height: 'ph',
  60. left: null,
  61. bottom: null,
  62. borderColor: tokens.color.accent10,
  63. borderRadius: 0,
  64. backgroundColor: tokens.color.transparent,
  65. // dataBackgroundColor: '#ddd',
  66. dataBackground: {
  67. lineStyle: {
  68. color: tokens.color.accent30,
  69. width: 0.5
  70. },
  71. areaStyle: {
  72. color: tokens.color.accent20,
  73. opacity: 0.2
  74. }
  75. },
  76. selectedDataBackground: {
  77. lineStyle: {
  78. color: tokens.color.accent40,
  79. width: 0.5
  80. },
  81. areaStyle: {
  82. color: tokens.color.accent20,
  83. opacity: 0.3
  84. }
  85. },
  86. // Color of selected window.
  87. fillerColor: 'rgba(135,175,274,0.2)',
  88. handleIcon: 'path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z',
  89. // Percent of the slider height
  90. handleSize: '100%',
  91. handleStyle: {
  92. color: tokens.color.neutral00,
  93. borderColor: tokens.color.accent20
  94. },
  95. moveHandleSize: 7,
  96. moveHandleIcon: 'path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z',
  97. moveHandleStyle: {
  98. color: tokens.color.accent40,
  99. opacity: 0.5
  100. },
  101. showDetail: true,
  102. showDataShadow: 'auto',
  103. realtime: true,
  104. zoomLock: false,
  105. textStyle: {
  106. color: tokens.color.tertiary
  107. },
  108. brushSelect: true,
  109. brushStyle: {
  110. color: tokens.color.accent30,
  111. opacity: 0.3
  112. },
  113. emphasis: {
  114. handleLabel: {
  115. show: true
  116. },
  117. handleStyle: {
  118. borderColor: tokens.color.accent40
  119. },
  120. moveHandleStyle: {
  121. opacity: 0.8
  122. }
  123. },
  124. defaultLocationEdgeGap: 15
  125. });
  126. return SliderZoomModel;
  127. }(DataZoomModel);
  128. export default SliderZoomModel;