In controllers there is such a function that sets the parameters of the schedule:
function sparklineChartCtrl() { var longLineData = [34, 43, 43, 35]; var longLineOptions = { type: 'line', lineColor: '#17997f', fillColor: '#ffffff' }; this.longLineData = longLineData; this.longLineOptions = longLineOptions; } The graph itself is displayed like this:
<div ng-controller="sparklineChartCtrl as spark"> <div sparkline spark-data="spark.inlineData" spark-options="spark.inlineOptions"></div> </div> The graph is built and everything works when the longLineData array longLineData registered by hands in the controller (as here in the example). But when trying to take an array through the $http.get() request, nothing works.
The task is using $http.get('url') to transfer the value of the array to the variable this.longLineData . I am completely new, I tried differently, it does not work.