-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotations not showing up in data table #12789
Comments
Is there a detailed design for the feature? Each annotation can have multiple labels. Each label has a position that is set by x and y values (scaled from set axes) or taken from a point (set by point id) in the chart. It is a similar problem to multiple scatter type series with multiple points with the same x values used - how should the data be sorted by default and what control should be allowed from the public API level? Should an annotation column be added to the data table after all series? or after each series, if the point from the given series is being annotated? If there is no detailed specification for this I would like to recommend for the initial feature implementation:
A basic POC for the visual output could be seen under a chart in a demo here: https://jsfiddle.net/BlackLabel/xc1p96qd/ |
@KacperMadej No spec from our side, but I think your proposal is sensible behavior. Alternatively a single column for annotations per series could be used, and the annotations could be concatenated. This would be similar to what we do for screen reader accessibility. Regardless it will definitely be important that this is behavior that can be turned off/on. I like the idea of supporting the @TorsteinHonsi Thoughts? |
I don't know... As Kacper indicates, annotations are by nature unstructured. If they were structured, I think in most cases it would be better to use data labels. This also works well with data exporting: http://jsfiddle.net/highcharts/LLExL/14423/ . |
Well, looking at our example demo for CSUN for example, doing something like this with data labels would be a lot more work for the chart creator: https://highcharts.github.io/highcharts-utils/samples/#gh/fa024da5f4/sample/highcharts/accessibility/accessible-annotations In this case, all but one of the annotations are part of the structured data, and something that would make sense to export/import across systems. I think we have a few obvious challenges here:
If we want to avoid having to come up with sensible default logic, one solution could be to document an API for accessing the annotations, and leaving it to the chart creator to format it in the data table (or elsewhere). Otherwise I think the following would be sensible default behavior:
|
I have only a few comments for the suggested defaults:
Freestanding labels might also be placed using pixel position in the plot area, so those might be added to new rows at the very bottom of the table as those won't have x nor y axis values assigned when compared to other data.
Yes, look like an overkill - this it not needed IMHO. Currently, labels could be grouped into a group in an annotation to set the same options to them. If the
A new option in As soon as all defaults will be selected we could start the implementation. |
Agree with your points @KacperMadej. The option for concatenating the annotations should probably indicate that it affects points with multiple annotations somehow. Maybe something like @TorsteinHonsi thoughts? |
Expected behaviour
Annotations connected to a point should be displayable in data tables, perhaps with an option in the annotations (and the individual annotation) to turn the behavior on/off.
Actual behaviour
Annotations are ignored when building the data table.
Live demo with steps to reproduce
https://jsfiddle.net/4Lvc63e9/
The text was updated successfully, but these errors were encountered: