api.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. // These APIs are for more advanced usages
  41. // For example extend charts and components, creating graphic elements, formatting.
  42. import ComponentModel from '../model/Component.js';
  43. import ComponentView from '../view/Component.js';
  44. import SeriesModel from '../model/Series.js';
  45. import ChartView from '../view/Chart.js';
  46. import SeriesData from '../data/SeriesData.js';
  47. import * as zrender_1 from 'zrender/lib/zrender.js';
  48. export { zrender_1 as zrender };
  49. import * as matrix_1 from 'zrender/lib/core/matrix.js';
  50. export { matrix_1 as matrix };
  51. import * as vector_1 from 'zrender/lib/core/vector.js';
  52. export { vector_1 as vector };
  53. import * as zrUtil_1 from 'zrender/lib/core/util.js';
  54. export { zrUtil_1 as zrUtil };
  55. import * as color_1 from 'zrender/lib/tool/color.js';
  56. export { color_1 as color };
  57. export { throttle } from '../util/throttle.js';
  58. import * as helper_1 from './api/helper.js';
  59. export { helper_1 as helper };
  60. export { use } from '../extension.js';
  61. export { setPlatformAPI } from 'zrender/lib/core/platform.js';
  62. // --------------------- Helper Methods ---------------------
  63. export { default as parseGeoJSON } from '../coord/geo/parseGeoJson.js';
  64. export { default as parseGeoJson } from '../coord/geo/parseGeoJson.js';
  65. import * as number_1 from './api/number.js';
  66. export { number_1 as number };
  67. import * as time_1 from './api/time.js';
  68. export { time_1 as time };
  69. import * as graphic_1 from './api/graphic.js';
  70. export { graphic_1 as graphic };
  71. import * as format_1 from './api/format.js';
  72. export { format_1 as format };
  73. import * as util_1 from './api/util.js';
  74. export { util_1 as util };
  75. export { default as env } from 'zrender/lib/core/env.js';
  76. // --------------------- Export for Extension Usage ---------------------
  77. // export {SeriesData};
  78. export { SeriesData as List }; // TODO: Compatitable with exists echarts-gl code
  79. export { default as Model } from '../model/Model.js';
  80. export { default as Axis } from '../coord/Axis.js';
  81. export { ComponentModel, ComponentView, SeriesModel, ChartView };
  82. // Only for GL
  83. export { brushSingle as innerDrawElementOnCanvas } from 'zrender/lib/canvas/graphic.js';
  84. // --------------------- Deprecated Extension Methods ---------------------
  85. // Should use `ComponentModel.extend` or `class XXXX extend ComponentModel` to create class.
  86. // Then use `registerComponentModel` in `install` parameter when `use` this extension. For example:
  87. // class Bar3DModel extends ComponentModel {}
  88. // export function install(registers) { registers.registerComponentModel(Bar3DModel); }
  89. // echarts.use(install);
  90. export function extendComponentModel(proto) {
  91. var Model = ComponentModel.extend(proto);
  92. ComponentModel.registerClass(Model);
  93. return Model;
  94. }
  95. export function extendComponentView(proto) {
  96. var View = ComponentView.extend(proto);
  97. ComponentView.registerClass(View);
  98. return View;
  99. }
  100. export function extendSeriesModel(proto) {
  101. var Model = SeriesModel.extend(proto);
  102. SeriesModel.registerClass(Model);
  103. return Model;
  104. }
  105. export function extendChartView(proto) {
  106. var View = ChartView.extend(proto);
  107. ChartView.registerClass(View);
  108. return View;
  109. }