chartjs / chartjs-plugin-annotation

Annotation plugin for Chart.js
MIT License
603 stars 325 forks source link

Label on type box for 0.5.7 #804

Closed florincod closed 1 year ago

florincod commented 1 year ago

Hi,

There are any plans to add box type label for 0.5.7 version? Or can be done differently? image

stockiNail commented 1 year ago

@florincod no, there aren't. I'd suggest to go to version 2 where it has been implemented. Do you have any issue to go to version 2?

florincod commented 1 year ago

hmm kinda, it will take time. we do have a lot of charts(custom charts) and we are using "chart.js": "2.8.0".

stockiNail commented 1 year ago

I understand. I think the version 0.5.7 is quite obsoleted and it has some bugs (and missing features) solved (and implemented) starting from version 1, where the plugin has been completely rewritten. I don't see any possibility to release new version 0.

florincod commented 1 year ago

@stockiNail, I found a solution, with some adjustments you can do it with type: line which has label prop

stockiNail commented 1 year ago

You're right. you can position a line over the box and hide the line (borderWidth: 0 or borderColor: transparent, I guess).