dataset.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 ComponentModel = require("../model/Component");
  20. var ComponentView = require("../view/Component");
  21. var _sourceHelper = require("../data/helper/sourceHelper");
  22. var detectSourceFormat = _sourceHelper.detectSourceFormat;
  23. var _sourceType = require("../data/helper/sourceType");
  24. var SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN;
  25. /*
  26. * Licensed to the Apache Software Foundation (ASF) under one
  27. * or more contributor license agreements. See the NOTICE file
  28. * distributed with this work for additional information
  29. * regarding copyright ownership. The ASF licenses this file
  30. * to you under the Apache License, Version 2.0 (the
  31. * "License"); you may not use this file except in compliance
  32. * with the License. You may obtain a copy of the License at
  33. *
  34. * http://www.apache.org/licenses/LICENSE-2.0
  35. *
  36. * Unless required by applicable law or agreed to in writing,
  37. * software distributed under the License is distributed on an
  38. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  39. * KIND, either express or implied. See the License for the
  40. * specific language governing permissions and limitations
  41. * under the License.
  42. */
  43. /**
  44. * This module is imported by echarts directly.
  45. *
  46. * Notice:
  47. * Always keep this file exists for backward compatibility.
  48. * Because before 4.1.0, dataset is an optional component,
  49. * some users may import this module manually.
  50. */
  51. ComponentModel.extend({
  52. type: 'dataset',
  53. /**
  54. * @protected
  55. */
  56. defaultOption: {
  57. // 'row', 'column'
  58. seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,
  59. // null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper"
  60. sourceHeader: null,
  61. dimensions: null,
  62. source: null
  63. },
  64. optionUpdated: function () {
  65. detectSourceFormat(this);
  66. }
  67. });
  68. ComponentView.extend({
  69. type: 'dataset'
  70. });