Created
May 3, 2018 13:03
-
-
Save induprasad/64ac5f1c8531129cb2323d58ab390612 to your computer and use it in GitHub Desktop.
Renderer of the LCMP_StrikeChart component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
rerender: function (component, helper) { | |
this.superRerender(); | |
if (!component.get('v.scriptsLoaded') || component.get('v.chartRendered')) { | |
return; | |
} | |
//make sure threshold isn't a string | |
component.get('v.thresholdValue', parseInt(component.get('v.thresholdValue'))); | |
var containerWidth = component.find('chartContainer').getElement().clientWidth; | |
component.set('v.containerWidth', containerWidth); | |
var chartDiv = component.find('chart').getElement(); | |
chartDiv.innerHTML = ''; | |
helper.drawChart(component, helper); | |
}, | |
unrender: function(component) { | |
this.superUnrender(); | |
window.removeEventListener('resize', component.resize); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment