Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I'm playing with Path2D in order to verify if I can add another annotation type, curve. Just playing.

And I'm using Path2D mainly because the most difficult part of a curve is to know if a point is inRange. Leveraging on Path2D I can use isPointInStroke method (but also isPointInPath for closed objects) and inRange is very simple (is also check the borderWidth).

I was thinking if you could make sense to go to Path2D. This could simplify some implementations (at least the inRange). The cons are that point and round rect drawings (currently delegated to Chartjs) should be "replicated" in the project.

What do you think?

You must be logged in to vote

Replies: 1 comment

Comment options

As written, I'm going to propose a PR where you could add a curve on the chart as annotation.
I'm not sure if a specific annotation type is better than adding an option to the line one. Both have got pro and cons.

Any preference? In the meanwhile, I'm going to implement new option to line annotation, because 80% of the code remain the same but some annoying if statements must be introduced.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
💡
Ideas
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.