graph.js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 echarts = require("../echarts");
  20. require("./graph/GraphSeries");
  21. require("./graph/GraphView");
  22. require("./graph/graphAction");
  23. var categoryFilter = require("./graph/categoryFilter");
  24. var visualSymbol = require("../visual/symbol");
  25. var categoryVisual = require("./graph/categoryVisual");
  26. var edgeVisual = require("./graph/edgeVisual");
  27. var simpleLayout = require("./graph/simpleLayout");
  28. var circularLayout = require("./graph/circularLayout");
  29. var forceLayout = require("./graph/forceLayout");
  30. var createView = require("./graph/createView");
  31. /*
  32. * Licensed to the Apache Software Foundation (ASF) under one
  33. * or more contributor license agreements. See the NOTICE file
  34. * distributed with this work for additional information
  35. * regarding copyright ownership. The ASF licenses this file
  36. * to you under the Apache License, Version 2.0 (the
  37. * "License"); you may not use this file except in compliance
  38. * with the License. You may obtain a copy of the License at
  39. *
  40. * http://www.apache.org/licenses/LICENSE-2.0
  41. *
  42. * Unless required by applicable law or agreed to in writing,
  43. * software distributed under the License is distributed on an
  44. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  45. * KIND, either express or implied. See the License for the
  46. * specific language governing permissions and limitations
  47. * under the License.
  48. */
  49. echarts.registerProcessor(categoryFilter);
  50. echarts.registerVisual(visualSymbol('graph', 'circle', null));
  51. echarts.registerVisual(categoryVisual);
  52. echarts.registerVisual(edgeVisual);
  53. echarts.registerLayout(simpleLayout);
  54. echarts.registerLayout(echarts.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout);
  55. echarts.registerLayout(forceLayout); // Graph view coordinate system
  56. echarts.registerCoordinateSystem('graphView', {
  57. create: createView
  58. });