Results 1 to 3 of 3

Thread: Chart Legend Hide/Show Event

  1. #1
    Ext JS Premium Member
    Join Date
    May 2012
    Posts
    4
    Vote Rating
    0
      0  

    Default Answered: Chart Legend Hide/Show Event

    In Ext.chart.Chart you can display a legend. With this legend the user can click on any of the legend items to hide or show the corresponding item on the chart.

    Are there any events that either the chart or legend trigger that will indicate which elements have been shown or hidden?
    Last edited by rlovelett; 9 May 2012 at 6:31 AM. Reason: <br>

  2. There currently is no event attached. Quickly looking at the code I think the best place to inject it would be overriding hideAll / showAll in Ext.chart.series.Series

  3. #2
    Sencha User RWaters's Avatar
    Join Date
    Mar 2007
    Location
    Los Angeles, CA
    Posts
    714
    Answers
    9
    Vote Rating
    0
      0  

    Default

    There currently is no event attached. Quickly looking at the code I think the best place to inject it would be overriding hideAll / showAll in Ext.chart.series.Series

  4. #3
    Sencha User
    Join Date
    Nov 2011
    Location
    Cuttack,Odisha,India
    Posts
    62
    Vote Rating
    1
      0  

    Default

    You can try my pieChart and in the series write type: 'mypie'

    Code:
    Ext.define('Deba.PieChart', {
                        extend: 'Ext.chart.series.Pie',
                        type: "mypie",                    
                        alias: 'series.mypie',
                        constructor: function(){
                            this.callParent(arguments);
                        },
                        hideAll: function() {
                            this.fireEvent('beforehide',this);
                            this.callParent(arguments);
                            this.fireEvent('afterhide',this);
                        },
                        showAll: function() {
                            this.fireEvent('beforeshow',this);
                            this.callParent(arguments);
                            this.fireEvent('aftershow',this);
                        },
                    });
    Use beforehide,afterhide,beforeshow, aftershow events.
    regards,

    Debabrata

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •