chartjs / chartjs-plugin-annotation

Annotation plugin for Chart.js
MIT License
607 stars 328 forks source link

Add arrows decoration to line annotation #608

Closed stockiNail closed 2 years ago

stockiNail commented 2 years ago

This PR is adding the optional arrowheads to a line annotation.

TODO

stockiNail commented 2 years ago

It's still a working progress. There is a bug that I'm having a look at.

EDIT: it should be solved

stockiNail commented 2 years ago

@kurkle before going on, when you have time (no hurry), could you check if there is anything to change or you don't like it?

stockiNail commented 2 years ago

I set milestone 1.3.0 but feel free to change it.

stockiNail commented 2 years ago

Remove all redundant options like: xScaleID: 'x' (things that specify the default), as @kurkle already started doing in #631 to make it a bit more readable

It should be ok now

stockiNail commented 2 years ago

The fixtures, could you combine some of those. The "borderWidht0" ones can be added as single arrows in the previous fixture. The "removed at runtime" fixtures can be combined into single one. (removing end, start, end+start from 3 different annotations in the same chart)

It should be ok

kurkle commented 2 years ago

| dist/chartjs-plugin-annotation.esm.js | 12.3 kB | +465 B (+4%) | | | dist/chartjs-plugin-annotation.js | 12.4 kB | +469 B (+4%) | | | dist/chartjs-plugin-annotation.min.js | 8.39 kB | +391 B (+5%) | 🔍 |

stockiNail commented 2 years ago

it sounds working well. Thank you