SliderZoomModel.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. var DataZoomModel = require("./DataZoomModel");
  20. /*
  21. * Licensed to the Apache Software Foundation (ASF) under one
  22. * or more contributor license agreements. See the NOTICE file
  23. * distributed with this work for additional information
  24. * regarding copyright ownership. The ASF licenses this file
  25. * to you under the Apache License, Version 2.0 (the
  26. * "License"); you may not use this file except in compliance
  27. * with the License. You may obtain a copy of the License at
  28. *
  29. * http://www.apache.org/licenses/LICENSE-2.0
  30. *
  31. * Unless required by applicable law or agreed to in writing,
  32. * software distributed under the License is distributed on an
  33. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  34. * KIND, either express or implied. See the License for the
  35. * specific language governing permissions and limitations
  36. * under the License.
  37. */
  38. var SliderZoomModel = DataZoomModel.extend({
  39. type: 'dataZoom.slider',
  40. layoutMode: 'box',
  41. /**
  42. * @protected
  43. */
  44. defaultOption: {
  45. show: true,
  46. // ph => placeholder. Using placehoder here because
  47. // deault value can only be drived in view stage.
  48. right: 'ph',
  49. // Default align to grid rect.
  50. top: 'ph',
  51. // Default align to grid rect.
  52. width: 'ph',
  53. // Default align to grid rect.
  54. height: 'ph',
  55. // Default align to grid rect.
  56. left: null,
  57. // Default align to grid rect.
  58. bottom: null,
  59. // Default align to grid rect.
  60. backgroundColor: 'rgba(47,69,84,0)',
  61. // Background of slider zoom component.
  62. // dataBackgroundColor: '#ddd', // Background coor of data shadow and border of box,
  63. // highest priority, remain for compatibility of
  64. // previous version, but not recommended any more.
  65. dataBackground: {
  66. lineStyle: {
  67. color: '#2f4554',
  68. width: 0.5,
  69. opacity: 0.3
  70. },
  71. areaStyle: {
  72. color: 'rgba(47,69,84,0.3)',
  73. opacity: 0.3
  74. }
  75. },
  76. borderColor: '#ddd',
  77. // border color of the box. For compatibility,
  78. // if dataBackgroundColor is set, borderColor
  79. // is ignored.
  80. fillerColor: 'rgba(167,183,204,0.4)',
  81. // Color of selected area.
  82. // handleColor: 'rgba(89,170,216,0.95)', // Color of handle.
  83. // handleIcon: 'path://M4.9,17.8c0-1.4,4.5-10.5,5.5-12.4c0-0.1,0.6-1.1,0.9-1.1c0.4,0,0.9,1,0.9,1.1c1.1,2.2,5.4,11,5.4,12.4v17.8c0,1.5-0.6,2.1-1.3,2.1H6.1c-0.7,0-1.3-0.6-1.3-2.1V17.8z',
  84. /* eslint-disable */
  85. handleIcon: 'M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z',
  86. /* eslint-enable */
  87. // Percent of the slider height
  88. handleSize: '100%',
  89. handleStyle: {
  90. color: '#a7b7cc'
  91. },
  92. labelPrecision: null,
  93. labelFormatter: null,
  94. showDetail: true,
  95. showDataShadow: 'auto',
  96. // Default auto decision.
  97. realtime: true,
  98. zoomLock: false,
  99. // Whether disable zoom.
  100. textStyle: {
  101. color: '#333'
  102. }
  103. }
  104. });
  105. var _default = SliderZoomModel;
  106. module.exports = _default;