Skip to content
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

Annotation Issue with highcharts-ng #648

Open
Ascension324 opened this issue Apr 3, 2018 · 2 comments
Open

Annotation Issue with highcharts-ng #648

Ascension324 opened this issue Apr 3, 2018 · 2 comments

Comments

@Ascension324
Copy link

Ascension324 commented Apr 3, 2018

Link to jsfiddle showing the issue.

http://jsfiddle.net/x7m3y51z/

Expected Behaviour

I have added an "Add Anno" button. When you press this button, an annotation "test2" should appear between "test1" and "test3".

Current Behaviour

Annotation "test1" and "test3" were added directly to $scope.chartConfig, and they show up and the chart. But test2 does not show when the the button is pressed. I have logged $scope.chartConfig into the console, and I can see that "test2" was added to $scope.chartConfig, however it just doesn't show on the chart.

Your Environment

  • Version of highcharts-ng used: current version
  • Browser Name and version: Chrome 65.0.3325.181
  • Operating System and version (desktop or mobile): Windows 1709
@KieranDotCo
Copy link

Try this @Ascension324 --> http://jsfiddle.net/x7m3y51z/4/

Added
$scope.chartConfig = angular.copy($scope.chartConfig);

@Ascension324
Copy link
Author

@KieranDotCo Thank you.

I've also found addAnnotation() that added the annotation in the correct location. However with the addAnnotation(), the annotation can not be read back from $scope.chartConfig, because it is added to the actual chart object.
And the documentation for addAnnotation() is on the highcharts API page yet. The following link is related to this, some of the readers may find extra information there.
https://forum.highcharts.com/highcharts-usage/chart-update-function-and-annotations-t39748/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants