Open TylerTCF opened 5 years ago
Hello, I have the same need. indicate the length of the arrow.
In Arrow class definition: there is a points property that indicates the length of the arrow.
However, I see no way to pass the value
How are the points indicated? https://github.com/holoviz/holoviews/blob/main/holoviews/element/annotation.py#L321
`
class Arrow(Annotation): """ Draw an arrow to the given xy position with optional text at distance 'points' away. The direction of the arrow may be specified as well as the arrow head style. """ ... ... points = param.Number(default=40, doc="Font size of arrow text (if any).")
... ... __pos_params = ['x', 'y', 'text', 'direction', 'points', 'arrowstyle']
def __init__(self, x, y, text='', direction='<',
points=40, arrowstyle='->', **params):
info = (x, y, text, direction, points, arrowstyle)
super().__init__(info, x=x, y=y,
text=text, direction=direction,
points=points, arrowstyle=arrowstyle,
**params)
def __setstate__(self, d):
"""
Add compatibility for unpickling old Arrow types with different
.data format.
"""
super().__setstate__(d)
if len(self.data) == 5:
direction, text, (x, y), points, arrowstyle = self.data
self.data = (x, y, text, direction, points, arrowstyle)
`
How are the points indicated?
I think there was an oversight; element.points
isn't used internally.
Am I missing in the documentation for holoviews or hvplot a style/parameter to set the arrow length for a hvplot.Arrow or hv.Arrow? The arrow_size option is only changing the size of the arrow head and not the length.