Dynamically Populate ng2 chart in Angular 4

删除回忆录丶 提交于 2019-12-03 21:59:17

Your global service holds the current data sets in the chartData member, and you read that variable once in your component's constructor. However when the data changes, the chartData member in your global service is replaced, but the one in your component keeps pointing to the original, so you never see a change.

You could use an observable stream in your global service to notify clients of change in data.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!