echarts icon indicating copy to clipboard operation
echarts copied to clipboard

Documentation does not document using position: [x, y] for graphic chart elements, which is important when implementing "draggable"

Open LWKlaus opened this issue 1 year ago • 0 comments

Version

5.2.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=line-draggable

Steps to Reproduce

  1. If you look at the link above, you will see that the position of each graphic circle is being placed by using position: [x, y]. (Refer to Line 107 of the script). The code is working exactly as it should.
  2. When you go to the current documentation for graphic elements: https://echarts.apache.org/en/option.html#graphic.elements-circle.x You will not see any documentation about being able to use the position object attribute.

Current Behavior

Documentation is missing for this object attribute. The code supports it and it works, but without looking at the examples, this is hard to figure out.

Expected Behavior

Documentation should reflect the ability to use position: [x, y] to define the position of the graphic. This is important because if you do not include this as an object attribute, draggable may not work as expected (if draggable is true and you want draggable behavior).

Environment

- OS: Windows 11
- Browser:   Any
- Framework: None

(Note that this is independent of any environmental setup)

Any additional comments?

This was discovered when trying to get draggable to work correctly, and I was not including position: [x, y], and I was trying to adjust top/left

While a bit of an edge case, given the significant usage of the library, having accurate documentation can save people many hours of time. Details on nuances such as this are still difficult to find on resources like stackoverflow.

Thanks for your consideration!

Lee

LWKlaus avatar Jun 25 '24 08:06 LWKlaus