score:2
Accepted answer
check your angular version... i think you are using version 1.2.x and it doesn't have the merge function yet, and angular-chart.js use this function.
what you can do is use this code, put it after the angular loading, and before the chart loading...
if (!angular.merge) {
angular.merge = (function mergepollyfill() {
function sethashkey(obj, h) {
if (h) {
obj.$$hashkey = h;
} else {
delete obj.$$hashkey;
}
}
function baseextend(dst, objs, deep) {
var h = dst.$$hashkey;
for (var i = 0, ii = objs.length; i < ii; ++i) {
var obj = objs[i];
if (!angular.isobject(obj) && !angular.isfunction(obj)) continue;
var keys = object.keys(obj);
for (var j = 0, jj = keys.length; j < jj; j++) {
var key = keys[j];
var src = obj[key];
if (deep && angular.isobject(src)) {
if (angular.isdate(src)) {
dst[key] = new date(src.valueof());
} else {
if (!angular.isobject(dst[key])) dst[key] = angular.isarray(src) ? [] : {};
baseextend(dst[key], [src], true);
}
} else {
dst[key] = src;
}
}
}
sethashkey(dst, h);
return dst;
}
return function merge(dst) {
return baseextend(dst, [].slice.call(arguments, 1), true);
}
})();
}
i took it from here: deep merge objects with angularjs
Source: stackoverflow.com
Related Query
- chartjs line graph destroy function is not clearing the old chart instances
- show label in tooltip but not in x axis for chartjs line chart
- angular-chartjs line chart TypeError: t.merge is not a function
- annotation line not visible in scatter chart in chartjs
- Do not draw line on condition in ChartJS line chart
- ChartJS line chart x = y not rendering astraight line
- $scope variable do not respond to the onClick function of angular chart
- ChartJS autoskip:False not working on line chart
- Chartjs backgroundColor for line chart does not appear in Vue app
- angular 4 line chart data is not showing data from http get
- ChartJs does not render chart when binding canvas id in Angular
- angular chartjs line chart default options
- ChartJS Line Chart - Points Connected out of order for Timeseries in Angular 6
- chartJS line chart not plotting values that are less than minY
- angular chart js type line setting chart-options not working
- ChartJs Angular directive - chart[chartType] is not a function
- ChartJS Line Chart shoud not start at 0 with all Lines
- ReferenceError: Chart is not defined - chartjs
- Display line chart with connected dots using chartJS
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- chartjs show dot point on hover over line chart
- ChartJs line chart repaint glitch while hovering over
- Angular-chart.js - Make line chart does not curve
- ChartJS - Line Chart with different size datasets
- Show data dynamically in line chart - ChartJS
- Line chart is showing under bar in combochart in chartjs
- Chart.js line chart is not displaying
- ChartJS - Line chart issue with only 1 point
- ChartJs line chart - display permanent icon above some data points with text on hover
- Map event position to y axis value in chartjs line chart
More Query from same tag
- Chart.js label and point getting cutoff on the right
- ChartJs chart won't update new values
- Using Javascript with MPDF
- Javascript chart display labels
- How do remove the bottom scale on a Chart.js bar chart
- Not render when there are too many columns
- Django Serializers - Return the sum of values by filter
- Using array as data in Chart.js
- Chartjs - How to get last 7 days on x-axis labels?
- How can have variable data be from a url in javascript
- The colors of the bar chart in chart.js is not showing. I tried background color and fill color but none of it worked
- Chart.js - annotation Vertical line moves with mouse in Angular 6
- Chartjs 2.x - Dataset color changing when redrawing chart
- Creating a grouped and stacked chart in Chart.js
- Format chart.js x labels
- ChartJS Email HTTP Request API
- Not all date data shows on x axis line chart
- Creating a real time line chart using chartjs and firebase realtime db
- Chartjs doughnut with multiple dataset issue in legend creation
- ChartJs how to get from mulitiple dateset which dataset bar is clicked
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- Get access to the chart.js component instance in React
- mysql sum query for chartjs
- Create space between legend and chart in charts.js
- chartjs Asp.net MVC Remote Data
- how to filter dataset from labels using ChartJS
- Create data in data with Chartjs
- Using Object.assign to merge objects
- ChartJS with Symfony 4.4 (UX component)
- How to unregister chartjs-plugin-labels globally?