let user gives annotations on graph and save it for future reference
Implemented in Highcharts
- https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/annotations/gui-buttons/
- https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/annotations/gui/
There’s a GUI to add/update/remove the annotations, and event handlers to connect to other actions.
-
Highcharts does have it, see:
- https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/annotations/gui-buttons/
- https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/annotations/gui/There's a GUI to add/update/remove the annotations, and event handlers to connect to other actions.
-
Jeremy Nagel commented
Would be great to have the same annotation editing functionality that HighStock now has in HighCharts (https://www.highcharts.com/blog/news/announcing-version-7-highcharts-highstock-and-highmaps/)
-
Highcharts provides APIs for Chart.addAnnotation, Chart.removeAnnotations and Chart.drawAnnotations. You can attach those to user events in your app, and store the annotation items for example in local storage to be added the next time the page is loaded.
-
Gagandeep Chhabda commented
Is there any way by which we can do this
We need to add annotations to the charts and then when the same chart is displayed again we need to show the same annotations
We have a very generic library where we cannot create annotation at the backend and we need to give the user freedom to add annotations -
You could for example catch the select event on a point, and when a point is selected, show an input box where the user can add some text. This text is sent by Ajax to the server and stored. In Highcharts, it can be displayed either as a data label, or a flag series item.
-
Balaji Durairajan commented
We want to annotate the chart and how can we do it. We are able to capture the datapoints. along with the selected data point, we would like to save the annotation too so that while it is retrieved the same can be displayed. Any idea on how to achieve it?
-
Reda Makhchan commented
I agree it becomes a "must have", I liked annotations that google uses in analytics.
-
Amit Mohod commented
Annotations can be of two types, Pinned or Unpinned annotations.
Pinned annotations can be attached (can be related) to particular data point/s. e.g. a line connecting to two datapoints.
Whereas unpinned annotations can be a separate entity, as suggested by 'rainier' in his comment. -
Amit, you're right. We could provide an API and fire events on add, update and delete annotations. Then it would be up to your implementation to hook up to the events, send Ajax calls and relate to the server side storage.
-
Amit Mohod commented
Even if saving is not possible, the annotations is be very "must have" feature I guess. You can provide array of annotations through api as JSON, which developer can used to save to his back end.
We have implemented this in our project. and can add annotation (text/graphics) and can save it thru ajax call.
-
mrafo commented
why this declined? i want it :)
-
rainier commented
Yeah! Like dygraphs, but especially great if the annotation didn't have to match exactly with a datapoint. Say I have 5 similar time series, and I want to be able to add a note around a certain time, that can be displayed separately for each time series, even if there is not a datapoint matching that exact timestamp for one or more of the time series. Thanks