Thanks for reaching out. Those formulas do not currently work with lines. A work-around is to apply the formulas to the shapes themselves, or put a small shape on the line that connects the shapes together.
We are always looking for ways to improve our product. Can you please fill out a feature request form with your request? Thanks!