Introduce ability to annotate a single bar#132
Conversation
|
mmm, I must have done something wrong. I just tried reproducing it again, and now it works fine. My appologies :) EDIT: found out why. copied the wrong version while going through the commits |
|
Nice feature, thanks! Is there a way to remove line padding at all? If I set linePadding to 0 some padding still there. |
|
@ygwain Actually it should be already like that. Could you provide your code to reproduce? |
|
@lukasbischof this PR is currently failing our style guidelines. If you rebase against master you can run |
|
@ygwain Should be fixed by now. I also inverted the padding, because I think it may be more natural if the padding is an inset spacing considering the behaviour applied in CSS. |
|
Hello, when you are planning to merge this feature? |
|
I would love to be able to use this feature. Please merge soon. |
|
I went back and read through the thread at #141 again. The author of that PR and I had decided a I'm going to delete the comments discussing this PR vs #141 to keep the thread clean since they no longer seem relevant |
benmccann
left a comment
There was a problem hiding this comment.
I think this is too specific to the bar chart. Could you pass a start and end tick and then use scale.getPixelForTick instead of using the bar controller and model?
|
@kurkle I have seen that these new features are not available on version 1 of the plugin. |
|
There is a discussion about this: #484 I would not like to add bar specific configuration when its quite easily achieved already. |
|
But samples would be good. |
|
@kurkle thank you ! I haven't seen the discussion. |
I think makes sense. Do you already a list of additional samples (apart this one) you'd like to have in the samples doc section? |
No, I don't have a list |


This PR introduces the ability to annotate only a single bar (implementing #101):

It also supports horizontal bars:

The PR adds two new options to the line annotation:
onlyForDataIndexwhich specifies the data index which should be annotatedlinePaddingwhich adds a customisable padding to the start and end of the linedatasetIndexwhich specifies on which dataset the data should be annotated