LineSeries.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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 _config = require("../../config");
  20. var __DEV__ = _config.__DEV__;
  21. var createListFromArray = require("../helper/createListFromArray");
  22. var SeriesModel = require("../../model/Series");
  23. /*
  24. * Licensed to the Apache Software Foundation (ASF) under one
  25. * or more contributor license agreements. See the NOTICE file
  26. * distributed with this work for additional information
  27. * regarding copyright ownership. The ASF licenses this file
  28. * to you under the Apache License, Version 2.0 (the
  29. * "License"); you may not use this file except in compliance
  30. * with the License. You may obtain a copy of the License at
  31. *
  32. * http://www.apache.org/licenses/LICENSE-2.0
  33. *
  34. * Unless required by applicable law or agreed to in writing,
  35. * software distributed under the License is distributed on an
  36. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  37. * KIND, either express or implied. See the License for the
  38. * specific language governing permissions and limitations
  39. * under the License.
  40. */
  41. var _default = SeriesModel.extend({
  42. type: 'series.line',
  43. dependencies: ['grid', 'polar'],
  44. getInitialData: function (option, ecModel) {
  45. return createListFromArray(this.getSource(), this, {
  46. useEncodeDefaulter: true
  47. });
  48. },
  49. defaultOption: {
  50. zlevel: 0,
  51. z: 2,
  52. coordinateSystem: 'cartesian2d',
  53. legendHoverLink: true,
  54. hoverAnimation: true,
  55. // stack: null
  56. // xAxisIndex: 0,
  57. // yAxisIndex: 0,
  58. // polarIndex: 0,
  59. // If clip the overflow value
  60. clip: true,
  61. // cursor: null,
  62. label: {
  63. position: 'top'
  64. },
  65. // itemStyle: {
  66. // },
  67. lineStyle: {
  68. width: 2,
  69. type: 'solid'
  70. },
  71. // areaStyle: {
  72. // origin of areaStyle. Valid values:
  73. // `'auto'/null/undefined`: from axisLine to data
  74. // `'start'`: from min to data
  75. // `'end'`: from data to max
  76. // origin: 'auto'
  77. // },
  78. // false, 'start', 'end', 'middle'
  79. step: false,
  80. // Disabled if step is true
  81. smooth: false,
  82. smoothMonotone: null,
  83. symbol: 'emptyCircle',
  84. symbolSize: 4,
  85. symbolRotate: null,
  86. showSymbol: true,
  87. // `false`: follow the label interval strategy.
  88. // `true`: show all symbols.
  89. // `'auto'`: If possible, show all symbols, otherwise
  90. // follow the label interval strategy.
  91. showAllSymbol: 'auto',
  92. // Whether to connect break point.
  93. connectNulls: false,
  94. // Sampling for large data. Can be: 'average', 'max', 'min', 'sum'.
  95. sampling: 'none',
  96. animationEasing: 'linear',
  97. // Disable progressive
  98. progressive: 0,
  99. hoverLayerThreshold: Infinity
  100. }
  101. });
  102. module.exports = _default;