feat(chart) :: draw horizontal reference lines - #1375
Conversation
27c1482 to
48dbb7d
Compare
lovasoa
left a comment
There was a problem hiding this comment.
I think we can remove support for yline colors in this pr, then separately add support for both individual point colors and yline colors. What do you think ?
| ('yline_label', 'A text to display next to the yline.', 'TEXT', FALSE, TRUE), | ||
| ('yline_color', 'The name of a color for the yline. Grey by default.', 'COLOR', FALSE, TRUE) |
There was a problem hiding this comment.
Don't you think it would be better to use common property names ? color and label that describe the color and the label of the element being drawn, be it a point, a vertical line, a horizontal line, or something else ?
|
@lovasoa I can try to split out the colour part into a separate PR, but I would push back against that and your comment a bit. Currently as the PR stands, users are able to add any number of X or Y reference lines. We would need colour to be able to tell them apart. Your comment did bring to mind accessiblity, mainly colour blindness. I can do a follow up PR to add different kinds of dashed reference lines so that end users don't only have to rely on colour to be able to tell the difference. |
Motivation
#1374
Description
ylineis drawn as a line across the chart at that value of the y axis, withyline_labelandyline_colorfor its text and its color. Reference lines are rows, so a chart can have as many of them as the query returns. A line follows its axis, so on ahorizontalbar chart aylineis drawn down the chart rather than across it. They are not added to the total of astackedchart, and are not filled in anareachart.Testing
ylinerow it receives, and ahorizontalbar chart draws itsylinedown the chart rather than across it.