I'm working on lightning component for community and using Chartjs library. Bar chart was working fine on chrome , but today when chrome install last update ( Version 60.0.3112.90 (Official Build) (64-bit) )
it start crash with message of " Not enough memory" doughnut still works fine but bar is not
it seems happen when loading Chartjs resource also
please help.
this is sample example I create: component:
<aura:component controller="chartReportExtension" implements="lightning:actionOverride,force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">
<ltng:require scripts="{! $Resource.Chart}"
afterScriptsLoaded="{!c.jsLoaded}" />
<aura:handler name="init" value="{!this}" action="{!c.doInit}" />
<div aura:id="canvas-holder" style="width:40%">
<canvas aura:id="chart-area" />
</div>
</aura:component>
Controller:
({
doInit: function(component, event, helper) {
},
jsLoaded : function(component, event, helper) {
console.log("1");
var config = {
type: 'bar',
data: {
datasets: [{
data: [
100,
50,
20,
110,
10,
],
backgroundColor: [
'#18335C','#1FB1C9','#ADCDC1','#D7C77E', '#0066ff'
],
label: 'Dataset 1'
}],
labels: [
"Red",
"Orange",
"Yellow",
"Green",
"Blue"
]
}
};
console.log("2");
var ctx = component.find("chart-area").getElement().getContext("2d");
console.log("3");
var myDoughnut = new Chart(ctx, config);
console.log("4");
}
})