[CLOSED] Preventing the legend from toggling the visibilty of series in a stacked bar / stacked column chart

  1. #1

    [CLOSED] Preventing the legend from toggling the visibilty of series in a stacked bar / stacked column chart

    I'm having the same problem that was discussed in the 2.x Premium help, where I am trying to disable the legend clicks: http://forums.ext.net/showthread.php...d-column-chart

    The solution posted there didn't seem to work for me in 3.1. I assume that script posted in the last comment should be put in a <script type="text/javascript"> section of the page header, but that didn't seem to work. I have been using http://examples.ext.net/#/Chart/Bar/Stacked/ as an example to try and turn off the clicking in the legend for.

    Also, is there a way to embedd the solution in the aspx.cs file behind the aspx file instead of the aspx file itself?

    Thanks!
    Last edited by Daniil; Jul 14, 2015 at 5:21 PM. Reason: [CLOSED]
  2. #2
    Hello @MrProtonYo!

    You're right, the solution no longer is valid for Ext.NET 3.x.

    Now you can use this one, though:
        <script>
            Ext.define('Ext.chart.LegendBase_ovr', {
                override: 'Ext.chart.LegendBase',
                onItemClick: Ext.emptyFn
            });
        </script>
    Let us know if it does not work for you!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Ops, forgot your other question!.. Sorry, its a bit confusing when more than one question is made in the same thread.

    For having this on your code behind file, one possibility is to add the following to your Page_Load function:

    var disableClickScript = @"
           Ext.define('Ext.chart.LegendBase_ovr', {
                override: 'Ext.chart.LegendBase',
                onItemClick: Ext.emptyFn
            });";
    
    X.AddScript(disableClickScript);
    Let us know if this does not do the trick for you.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: May 06, 2014, 5:48 AM
  2. Replies: 5
    Last Post: Mar 11, 2014, 3:03 PM
  3. [CLOSED] MVC - Stacked Column Chart
    By immenso in forum 2.x Premium Help
    Replies: 3
    Last Post: Oct 09, 2013, 3:35 PM
  4. Replies: 0
    Last Post: Apr 25, 2013, 10:39 AM
  5. Replies: 0
    Last Post: Apr 25, 2013, 9:25 AM

Posting Permissions