tooltip.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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("./axisPointer");
  21. require("./tooltip/TooltipModel");
  22. require("./tooltip/TooltipView");
  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. // FIXME Better way to pack data in graphic element
  42. /**
  43. * @action
  44. * @property {string} type
  45. * @property {number} seriesIndex
  46. * @property {number} dataIndex
  47. * @property {number} [x]
  48. * @property {number} [y]
  49. */
  50. echarts.registerAction({
  51. type: 'showTip',
  52. event: 'showTip',
  53. update: 'tooltip:manuallyShowTip'
  54. }, // noop
  55. function () {});
  56. echarts.registerAction({
  57. type: 'hideTip',
  58. event: 'hideTip',
  59. update: 'tooltip:manuallyHideTip'
  60. }, // noop
  61. function () {});