• Kanth k
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies
Hi All,
I am trying to decrypt data in csv file and got error is "FATAL_ERROR|System.SecurityException: pad block corrupted". Can anybody send code to solve issue. I execute below code in annonymous block
list<attachment> atlst =new list<attachment>();

        
        for(attachment at:[select id,body,name,parentId from attachment where parentid='a010o000022leDD' limit 1])
        {
            
        
Blob cryptoKey = Crypto.generateAesKey(256);
       
        Blob data = (at.body);
            
            Blob decryptedData = Crypto.decryptWithManagedIV('AES256', cryptoKey, data);
             String decryptedClearText = decryptedData.toString();
        
        Attachment atEncrypt=new attachment();
        atEncrypt.name=at.name+'__Decrypted22.csv';
        atEncrypt.body=blob.valueof(decryptedClearText);
        atEncrypt.parentId=at.parentId;
atlst.add(atEncrypt) ;
        }
if(atlst.size()>0)
{
insert atlst;
}

 
Hi All,

 Can any body tell that How many emails can send per day using html type or text type template for developer, enterprises, professional editions
Hi,

 I am  getting Apex heap size is too large error message when i am uploading large file (10MB Size and data size is 65000records) in visualforce page using batch class. but if file size is 5MB(26000 records)  data is inserted without any error.

Can any baody help me where i am make mistake in
<apex:inputFile value="{!csvfile}" fileName="{!fname}" id="fileinput"/> 
                <center><apex:commandButton value="Upload File" id="theButton" style="width:88px;" action="{!uploadfile}"/></center>
            </apex:pageBlock>

batch class code.
public class uploadFilebatch_testing
{
    PUBLIC transient  blob csvfile{get;set;}
    public String fname{get;set;}
public void uploadfile()
    {
         Email_Service_Logs__c servicestatus=new Email_Service_Logs__c();
        Attachment attch = new Attachment();
        if(csvfile!=null)
        {
           count= database.countQuery('select count() from Email_Service_Logs__c');
            count=count+1;
            system.debug('noof records'+count);
            
             //servicestatus.name=fname;
            servicestatus.Date__c =system.today();
            servicestatus.Subject__c   =fname+'_'+count;
            if(fname!=null)
            insert servicestatus;
            
            attch.name = fname;
            attch.body = csvfile;
            attch.parentID =servicestatus.Id; 
            if(fname!=null)
            insert attch;
            
            
            
            dataBatch_testing cuatch=new dataBatch_testing(attch.name,servicestatus.id);
            //cuatch.teoost(attch.name,,servicestatus.id);
            String strBatchId = Database.executeBatch(cuatch, 300);
            
        }
______________________

Batch class code:
global with sharing class dataBatch_testing  implements Database.batchable<String>
{
 private  String m_csvFile;
   private Integer m_startRow;
   global boolean headervaleus=true;
   public string filename;
   public id statusid;
   public dataBatch_testing (string filename,string emailstatusid)
   {
 
 this.filename=filename;
statusid=emailstatusid;
}
 global Iterable<String> start(Database.batchableContext batchableContext)
   { 
      transient string mcsvfile;
       for(Attachment att:[select id,name,body from Attachment where name=:filename and parentid=:statusid])
       {
           //m_csvFile=att.body.tostring();
           HttpRequest tmp = new HttpRequest();
           tmp.setBodyAsBlob(att.body);
           //m_csvFile= tmp.getBody();
           mcsvfile=tmp.getBody();

       }
       
       
       return new CSVIterator(mcsvfile, '\n');
       //return new CSVIterator(m_csvFile, parser.crlf);
   }
 global void execute(Database.BatchableContext batchableContext, List<String> scope)  
   {
       system.debug('inside execute method'+scope.size());
      
       String csvFile = '';
       for(String row : scope)
       {
           csvFile += row + parser.crlf;
    
       }
       UploadDta_test.InsertValues_test(batchableContext.getJobId(),csvFile,headervaleus,statusid);
       
       if(headervaleus==true)
           headervaleus=false;
     
   }
   global void finish(Database.BatchableContext batchableContext)
   {

}

 

Hi, 
 Can any body help me that how to upload .XML file using batch class to insert account record?
I have written code and excetute it in developer console and getting error that is "You've exceeded the limit of 100 jobs in the flex queue for org 00D2E000001G0Xe. Wait for some of your batch jobs to finish before adding more. To monitor and reorder jobs, use the Apex Flex Queue page in Setup."

Code in developer console :
contact cnt =[select id,name from contact where name='Dummy'];
attachment att =[select id,name,body,parentid from attachment where parentid=:cnt.id];

Product_XML_ParserDemo.makeAccount(att);

 

global class Product_XML_ParserDemo
{   
    public class wrap
    {
        public String accname{get; set;}
        public String accnumb{get; set;}
        public String accphone{get; set;}
        public String accwebsite{get; set;}
        public String accbstrt{get; set;}
        public String accbcity{get; set;}
        public String accbste{get; set;}
        public String accbpcodde{get; set;}
        public String accbcntry{get; set;}
    }
   webservice static void makeAccount(attachment att) {     
        DOM.Document doc = new DOM.Document();
        blob myfile = att.body;
        doc.load(String.valueOf(myfile.toString()));    
        Product_XML_ParserDemo pxmlprs = new Product_XML_ParserDemo();
        pxmlprs.parseproducts(doc.getRootElement());
        
    }
 public List<wrap> wrplist{get;set;}
 private void parseproducts(DOM.XMLNode node) 
    {
        node=node.getChildElement('list',null);
        for (Dom.XMLNode child : node.getChildElements()) 
        {
            
            if(child.getName() == 'Account')
            { 
                System.debug('child'+child);
                parseReport(child);
            }
        }
    }
    private void parseReport(DOM.XMLNode node ) 
    {
        wrap r = new wrap();
        wrplist = new List<wrap>(); 
        for (Dom.XMLNode child : node.getChildElements()) 
        {
            if (child.getName() == 'Name') 
            {
                r.accname = child.getText().trim();
            } 
            else if (child.getName() == 'AccountNumber') 
            {
                r.accnumb= child.getText().trim();
            } 
            else if (child.getName() == 'Phone') 
            {
                r.accphone= child.getText().trim();
            }  
            else if (child.getName() == 'Website') 
            {
                r.accwebsite= child.getText().trim();
            }
            else if (child.getName() == 'Billingstreet') 
            {
                r.accbstrt= child.getText().trim();
            }
            else if (child.getName() == 'BillingCity') 
            {
                r.accbcity= child.getText().trim();
            }
            else if (child.getName() == 'BillingState') 
            {
                r.accbste= child.getText().trim();
            }
            else if (child.getName() == 'BillingPostalCode') 
            {
                r.accbpcodde= child.getText().trim();
            }
            else if (child.getName() == 'BillingCountry') 
            {
                r.accbcntry= child.getText().trim();
            }
        }
        wrplist.add(r);
        list<account> prodlist=new list<account>();
        for(wrap w: wrplist)
        {
            
            account acc=new account();
            
                acc.Name = w.accname;
                acc.AccountNumber = w.accnumb;
                acc.Phone = w.accphone;
                acc.Website = w.accwebsite;
                acc.Billingstreet = w.accbstrt;
                acc.BillingCity = w.accbcity;
                acc.BillingState = w.accbste;
                acc.BillingPostalCode = w.accbpcodde;
                acc.BillingCountry = w.accbcntry;
                
                
               
                prodlist.add(acc);
          
           }
            batchTestNew dbbbt = new batchTestNew(prodlist);
           Id batchJobId= database.executeBatch(dbbbt,50);
}
____________________________________________
Batch Class
global class batchTestNew implements Database.Batchable<sObject>{
public List <account> accountsToParseSet = new List<account>();

   global batchTestNew(List<account> accountsToParseGet){
   accountsToParseSet = accountsToParseGet;          
   }

   global List<SObject> start(Database.BatchableContext BC){
      return accountsToParseSet;
   }

   global void execute(Database.BatchableContext BC, 
                       List<sObject> scope){
      for(sObject s : scope){
           upsert accountsToParseSet;
                  }      
      INSERT scope;
   }

   global void finish(Database.BatchableContext BC){

   }

}

 
Hi,

  Can   anybody share any links or code regarding on creating funnel chart in lightning component?
 
Hi,
I am getting chart as shown below but i need chart below for every question  based on values in question. Can any body help me where i made mistake in my code using lightning component.Please Reply me as soon as possible.
Lightning Component:
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global"  controller="Surveyresultsctrl">
<aura:attribute name="srvqusrespwraplst" type="object"/>
 <!--###### MODAL BOX BODY Part Start######-->
                    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                        <div class="slds-col--padded slds-size--1-of-2 slds-medium-size--2-of-6 slds-large-size--4-of-12">
                            <canvas aura:id="barChart"  style="height: 400px"/>
                        </div>
                        <aura:iteration items="{!v.srvqusrespwraplst}" var="ques" indexVar="index">
                                
                                        <table border="0">
                                            <tr style="display: inline-block;">
                                                <td>
                                                    <span style="padding-left:6px;padding-right:6px;padding-top:2px;padding-bottom:2px;background-color:white;color:black;border-radius:50%;">
                                                        {!index+1}
                                                    </span>&nbsp;&nbsp;
                                                </td>
                                                <td>
                                                    <span style="color:black;">
                                                    {!ques.sqname}</span>&nbsp;
                                                    
                                                </td>
                                            </tr>
                                            
                                             <tr style="display: inline-block;">
                                                
                                                <td colspan="2"><br/>
                                                    

                                                     <table width="100%" border="0">
                                                            <tr style="display: inline-block;">
                                                                {!ques.sqrespcnt}
                                                                <aura:iteration items="{!ques.srchoicewrplst}" var="typvar">
                                                                    
                                                                    <td width="100%" style="padding-left:5px;padding-right:10px;text-color:black;color:black">
                                                                        <aura:if isTrue="{!typvar.servqname  == ques.sqname}">
                                                                            <aura:if isTrue="{!typvar.sqrespcnt1  != null}">
                                                                             {!typvar.serresp1}  : {!typvar.sqrespcnt1} 
                                                                                
                                                                            </aura:if>
                                                                        </aura:if>
                                                                    </td>
                                                                </aura:iteration>
                                                        </tr>
                                                    </table>
                                                  
                                                    
                                                    
                                                </td>
                                            </tr>
                                        </table>
                        </aura:iteration>
                    </div>
</div>

</aura:component>
Lightning Compnent Helper:

doInit : function(component, event, helper)
    {
        var temp = [];

        component.set("v.isOpen", true);
        var action = component.get("c.getsrwrapmap");
        action.setParams({
            surveyid: component.get("v.recordId"),
        });
        action.setCallback(this, function(response) {
            //var state = response.getState();
            //alert(state);
                         if(response.getState() === 'SUCCESS' && response.getReturnValue()){
                 temp = response.getReturnValue();
                 this.createGraph(component, temp);

                //var dataObj= response.getReturnValue();
                //jsonData = dataObj;
                //console.log('===='+dataObj);
                 //this.createGraph(component, temp);
                //component.set("v.srvqusrespwraplst",dataObj);
               // helper.piechart(component,event,helper);
                //helper.Linechart(component,event,helper);
               // helper.donutchart(component,event,helper);
            }
        });
        $A.enqueueAction(action);
    },
    createGraph : function(component, temp) {
        var dataMap = {"chartLabels": Object.keys(temp),"chartData": Object.values(temp)};
        var el = component.find('barChart').getElement();
        var ctx = el.getContext('2d');
        new Chart(ctx, {
          type: 'line',
          options: {
              animation: false,
              legend: {display: true},
              maintainAspectRatio: false,
              responsive: true,
              responsiveAnimationDuration: 0,
              scales: {
                  yAxes: [{
                      ticks: {
                          beginAtZero: true,
                          callback: function(value, index, values) {
                              if(parseInt(value) >= 0){
                                  return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
                              } else {
                                  return value;
                              }
                          }
                      }
                  }]
              }
          },
          data: {
            labels: dataMap.chartLabels,
            datasets: [
              {
                label: "Survey Results",
                backgroundColor: "rgba(255, 191, 0,0.5)",
                data: dataMap.chartData
              }
            ]
          }
        });
	},
_______________________________
Apex Class:
public class Surveyresultsctrl {
    @AuraEnabled 
    public static list<srwrap> getsrwraplst(string surveyid)
    {
        list<srwrap> srwlst = new list<srwrap>();
        list<srchoiceswrap> tempprdqueswlst = new list<srchoiceswrap>();
        map<string,integer> timap = new map<string,integer>();
        set<string> sqidst = new set<string>();
        map<string,map<string,list<SurveyQuestionResponse__c>>> optmap = new map<string,map<string,list<SurveyQuestionResponse__c>>>();
        map<string,map<string,integer>> optmap1 = new  map<string,map<string,integer>>();
        List<AggregateResult> sqraggr= [select count(Id) a,Question_Type__c,Survey_Question__r.Name sq,Survey_Question__c from SurveyQuestionResponse__c where Survey_Question__r.Survey__c=:surveyid group by Question_Type__c, Survey_Question__r.Name,Survey_Question__c];
        for(AggregateResult ar: sqraggr)
        {
            string sqid= string.valueof(ar.get('Survey_Question__c'));
            sqidst.add(sqid);
        }
        
        List<AggregateResult> sqraggr1= [select count(Id) a,Question_Type__c,Survey_Question__r.Name sq,CALENDAR_MONTH(Date__c)month from SurveyQuestionResponse__c where Survey_Question__r.Survey__c=:surveyid and Date__c=THIS_MONTH	 GROUP BY CALENDAR_MONTH(Date__c),Question_Type__c,Survey_Question__r.Name];
        for(AggregateResult ar: sqraggr1)
        {
            srwrap sr = new srwrap();
            srchoiceswrap src =new srchoiceswrap();
            string qtype='';
            qtype= string.valueof(ar.get('Question_Type__c'));
            if(qtype == 'Date')
            {
                sr.sqname =  string.valueof(ar.get('sq'));
                src.sqrespdtcnt = integer.valueof(ar.get('a'));
                tempprdqueswlst.add(src);
                sr.srchoicewrplst = tempprdqueswlst;
                sr.sqrespcnt =integer.valueof(ar.get('a'));
                //system.debug('Dt&&'+sr.sqrespcnt);
                srwlst.add(sr);  
            }
            
        }
        
        
        map<string,list<SurveyQuestionResponse__c>>  sqrmap = new map<string,list<SurveyQuestionResponse__c>>();
        list<SurveyQuestionResponse__c> sqrlst = new list<SurveyQuestionResponse__c>();
        for(SurveyQuestionResponse__c sqr : [select Id,Question_Type__c,Survey_Question__r.Type__c,Survey_Question__r.Required__c,Survey_Question__r.Name,Survey_Question__c,Survey_Question__r.Choices__c,Response__c from SurveyQuestionResponse__c where Survey_Question__c in:sqidst])
        {
            
            if(sqr.Question_Type__c!='Date')
            {
            sqrlst.add(sqr);
            sqrmap.put(sqr.Survey_Question__r.Name,sqrlst); 
            }
        }
        
        for(string sqid : sqrmap.keyset())
        {
            Map<String,Integer> elCount = new Map<String,Integer>();
            if(sqrmap.containskey(sqid))
            {
                list<SurveyQuestionResponse__c> sqrlsts = sqrmap.get(sqid);
                for(SurveyQuestionResponse__c sqr : sqrlsts) 
                {
                    //if(sqid == sqr.Survey_Question__c)
                    if(sqid == sqr.Survey_Question__r.Name)
                    {
                        if(sqr.Question_Type__c=='Multi Select - Checkbox')
                        {
                            for(string key : sqr.Response__c.split(';'))
                            {
                                if(!elCount.containsKey(key)){
                                elCount.put(key,0);
                                }
                                Integer currentInt=elCount.get(key)+1;
                                elCount.put(key,currentInt);
                             }    
                        }
                        if(sqr.Question_Type__c=='Radio')
                        {
                            for(string key : sqr.Response__c.split(';'))
                            {
                                if(!elCount.containsKey(key)){
                                elCount.put(key,0);
                                }
                                Integer currentInt=elCount.get(key)+1;
                                elCount.put(key,currentInt);
                             }    
                        }
                        
                    }
                   
                }
                 optmap1.put(sqid,elCount);
            }
        }
        //list<srchoiceswrap> tempprdqueswlst = new list<srchoiceswrap>();
        //map<string,integer> timap = new map<string,integer>();
        //list<srwrap> srwlst = new list<srwrap>();
        
        for(string sqid : optmap1.keyset())
        {
            srwrap srw = new srwrap();
            srw.sqname =  sqid;
            //if(optmap1.get(sqid)!=null)
            {
                timap = optmap1.get(sqid);
                for(string coicename : timap.keyset())
                {
                  srchoiceswrap src =new srchoiceswrap();
                  src.servqname = sqid;
                  //srw.sqname =  sqid;
                   string choicename =  coicename ;
                   //srw.serresp=choicename;
                   src.serresp1 =  coicename ;
                   system.debug('&&&'+srw.serresp);
                   //srw.sqrespcnt=timap.get(coicename);
                   src.sqrespcnt1 =  timap.get(coicename);
                   //srwlst.add(srw);
                   tempprdqueswlst.add(src);
                }
                
            }
            srw.srchoicewrplst = tempprdqueswlst;
             srwlst.add(srw);   
        }
        
        return srwlst;
    }
    @AuraEnabled 
    public static map<string,integer> getsrwrapmap(string surveyid)
    {
    	map<string,integer> srmap = new map<string,integer>(); 
        list<srwrap> srwraplst	= getsrwraplst(surveyid);
        list<srchoiceswrap> srclst;
        for(srwrap sr : srwraplst)
        {
        	  srclst = sr.srchoicewrplst;
            for(srchoiceswrap src : srclst)
            {
                if(sr.sqname == src.servqname)
                {
                	srmap.put(src.serresp1,src.sqrespcnt1);
                }
            }
        }
        return srmap;
    }
    public class srwrap
    {
        @AuraEnabled  public string  serques{get;set;}
        @AuraEnabled  public string  serresp{get;set;}
        @AuraEnabled  public integer sqrespcnt{get;set;}
        @AuraEnabled  public string  sqname{get;set;}
        @AuraEnabled  public Survey_Question__c sq{get;set;}
        @AuraEnabled public list<string> choiceslst{get;set;}
        @AuraEnabled public list<string> optionslst{get;set;}
        @AuraEnabled public list<string> seleoptionslst{get;set;}
        
        @AuraEnabled  public list<srchoiceswrap> srchoicewrplst{get;set;}
        public srwrap()
        {
            sqname = '';
            serques = '';
            serresp = '';
            sqrespcnt =null;
            optionslst = new list<string>();
            choiceslst = new list<string>();
            sq = new Survey_Question__c();
            srchoicewrplst = new list<srchoiceswrap>();
        }
    }
    public class srchoiceswrap
    {
        @AuraEnabled  public string  typestr{get;set;}
        
        @AuraEnabled  public list<SurveyQuestionResponse__c> optionlst{get;set;}
        @AuraEnabled  public string  serresp1{get;set;}
        @AuraEnabled  public string  servqname{get;set;}
        @AuraEnabled  public integer sqrespcnt1{get;set;}
        @AuraEnabled  public integer sqrespdtcnt{get;set;}
        public srchoiceswrap()
        {
            optionlst = new list<SurveyQuestionResponse__c>();
            typestr = '';
            serresp1 = '';
            servqname ='';
            sqrespdtcnt = null;
            sqrespcnt1 =null;
        }
    }
    
    
}

User-added image
Hi All,
I am trying to decrypt data in csv file and got error is "FATAL_ERROR|System.SecurityException: pad block corrupted". Can anybody send code to solve issue. I execute below code in annonymous block
list<attachment> atlst =new list<attachment>();

        
        for(attachment at:[select id,body,name,parentId from attachment where parentid='a010o000022leDD' limit 1])
        {
            
        
Blob cryptoKey = Crypto.generateAesKey(256);
       
        Blob data = (at.body);
            
            Blob decryptedData = Crypto.decryptWithManagedIV('AES256', cryptoKey, data);
             String decryptedClearText = decryptedData.toString();
        
        Attachment atEncrypt=new attachment();
        atEncrypt.name=at.name+'__Decrypted22.csv';
        atEncrypt.body=blob.valueof(decryptedClearText);
        atEncrypt.parentId=at.parentId;
atlst.add(atEncrypt) ;
        }
if(atlst.size()>0)
{
insert atlst;
}

 

Hi, 
 Can any body help me that how to upload .XML file using batch class to insert account record?
I have written code and excetute it in developer console and getting error that is "You've exceeded the limit of 100 jobs in the flex queue for org 00D2E000001G0Xe. Wait for some of your batch jobs to finish before adding more. To monitor and reorder jobs, use the Apex Flex Queue page in Setup."

Code in developer console :
contact cnt =[select id,name from contact where name='Dummy'];
attachment att =[select id,name,body,parentid from attachment where parentid=:cnt.id];

Product_XML_ParserDemo.makeAccount(att);

 

global class Product_XML_ParserDemo
{   
    public class wrap
    {
        public String accname{get; set;}
        public String accnumb{get; set;}
        public String accphone{get; set;}
        public String accwebsite{get; set;}
        public String accbstrt{get; set;}
        public String accbcity{get; set;}
        public String accbste{get; set;}
        public String accbpcodde{get; set;}
        public String accbcntry{get; set;}
    }
   webservice static void makeAccount(attachment att) {     
        DOM.Document doc = new DOM.Document();
        blob myfile = att.body;
        doc.load(String.valueOf(myfile.toString()));    
        Product_XML_ParserDemo pxmlprs = new Product_XML_ParserDemo();
        pxmlprs.parseproducts(doc.getRootElement());
        
    }
 public List<wrap> wrplist{get;set;}
 private void parseproducts(DOM.XMLNode node) 
    {
        node=node.getChildElement('list',null);
        for (Dom.XMLNode child : node.getChildElements()) 
        {
            
            if(child.getName() == 'Account')
            { 
                System.debug('child'+child);
                parseReport(child);
            }
        }
    }
    private void parseReport(DOM.XMLNode node ) 
    {
        wrap r = new wrap();
        wrplist = new List<wrap>(); 
        for (Dom.XMLNode child : node.getChildElements()) 
        {
            if (child.getName() == 'Name') 
            {
                r.accname = child.getText().trim();
            } 
            else if (child.getName() == 'AccountNumber') 
            {
                r.accnumb= child.getText().trim();
            } 
            else if (child.getName() == 'Phone') 
            {
                r.accphone= child.getText().trim();
            }  
            else if (child.getName() == 'Website') 
            {
                r.accwebsite= child.getText().trim();
            }
            else if (child.getName() == 'Billingstreet') 
            {
                r.accbstrt= child.getText().trim();
            }
            else if (child.getName() == 'BillingCity') 
            {
                r.accbcity= child.getText().trim();
            }
            else if (child.getName() == 'BillingState') 
            {
                r.accbste= child.getText().trim();
            }
            else if (child.getName() == 'BillingPostalCode') 
            {
                r.accbpcodde= child.getText().trim();
            }
            else if (child.getName() == 'BillingCountry') 
            {
                r.accbcntry= child.getText().trim();
            }
        }
        wrplist.add(r);
        list<account> prodlist=new list<account>();
        for(wrap w: wrplist)
        {
            
            account acc=new account();
            
                acc.Name = w.accname;
                acc.AccountNumber = w.accnumb;
                acc.Phone = w.accphone;
                acc.Website = w.accwebsite;
                acc.Billingstreet = w.accbstrt;
                acc.BillingCity = w.accbcity;
                acc.BillingState = w.accbste;
                acc.BillingPostalCode = w.accbpcodde;
                acc.BillingCountry = w.accbcntry;
                
                
               
                prodlist.add(acc);
          
           }
            batchTestNew dbbbt = new batchTestNew(prodlist);
           Id batchJobId= database.executeBatch(dbbbt,50);
}
____________________________________________
Batch Class
global class batchTestNew implements Database.Batchable<sObject>{
public List <account> accountsToParseSet = new List<account>();

   global batchTestNew(List<account> accountsToParseGet){
   accountsToParseSet = accountsToParseGet;          
   }

   global List<SObject> start(Database.BatchableContext BC){
      return accountsToParseSet;
   }

   global void execute(Database.BatchableContext BC, 
                       List<sObject> scope){
      for(sObject s : scope){
           upsert accountsToParseSet;
                  }      
      INSERT scope;
   }

   global void finish(Database.BatchableContext BC){

   }

}

 
Hi,

  Can   anybody share any links or code regarding on creating funnel chart in lightning component?