Passing Pie Chart Id to Tip Render Function

  1. #1

    Passing Pie Chart Id to Tip Render Function

    I need to have more than one Pie Chart in the same web page. How can I pass the Chart Id to the tip render function?

    In this example, the Chart1 is hardcode.

    https://examples2.ext.net/#/Chart/Pie/Basic/

      var tipRenderer = function (storeItem, item) {
                //calculate percentage.
                var total = 0;
    
                App.Chart1.getStore().each(function (rec) {
                    total += rec.get('Data1');
                });
                
                this.setTitle(storeItem.get('Name') + ': ' + Math.round(storeItem.get('Data1') / total * 100) + '%');
            };
  2. #2
    Hi @iomega55,

    Welcome to the Ext.NET forums!

    It is how to get a Chart component without hardcoding.
    var tipRenderer = function (storeItem, item) {
        var chart = item.series.chart;
        ...

Similar Threads

  1. [CLOSED] global function call after render
    By RCM in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 04, 2013, 4:42 AM
  2. Replies: 0
    Last Post: Aug 23, 2013, 11:16 AM
  3. [CLOSED] Passing function result as value of a parameter
    By RCN in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 13, 2012, 11:43 AM
  4. [CLOSED] passing ext.net controls to controller function
    By AnulekhaK in forum 1.x Legacy Premium Help
    Replies: 11
    Last Post: Feb 16, 2012, 12:55 PM
  5. Replies: 3
    Last Post: Aug 21, 2010, 5:26 AM

Tags for this Thread

Posting Permissions