1. #21
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    295
    Vote Rating
    55
    nohuhu has disabled reputation

      1  

    Default

    Daniil,

    Is there any compelling reason to use prototype munging instead of the normal class inheritance model? I don't see any, and you shouldn't, too.

    Regards,
    Alex.
    Regards,
    Alex.

  2. #22
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    988
    Vote Rating
    118
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default

    Hi @nohuhu,

    I think it is my bad habit, thank you for pointing that out.

    You meant that I should write something like this:
    Code:
    Ext.chart.Chart.override({
        initComponent: function() {
            this.callParent();
            this.legend = Ext.create('Ext.ux.chart.SmartLegend', {
                position: 'right',
                chart: this,
                rebuild: true,
                boxStrokeWidth: 1
            });
        }
    });
    or create a new class inheriting from Chart, right?
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  3. #23
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    295
    Vote Rating
    55
    nohuhu has disabled reputation

      1  

    Default

    @Daniil,

    Not exactly. To override a stock class, use Ext.define instead:

    PHP Code:
    Ext.define('MyOverrides.chart.Chart', {
        
    override'Ext.chart.Chart',
        ...
    }); 
    This will allow you to take advantage of the class system, dynamic loading and Sencha Cmd build process. However, the preferred way to reuse the code is class inheritance. See my Stackoverflow answer for more explanations.

    Regards,
    Alex.
    Regards,
    Alex.

  4. #24
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    988
    Vote Rating
    118
    Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all Daniil is a name known to all

      0  

    Default

    Oh, I see the Ext.Base.override method is marked as deprecated. Thank you, Alex.

    Also thank you for the Stackoverflow link. It was worth to read!
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  5. #25
    Sencha User
    Join Date
    Jun 2013
    Posts
    1
    Vote Rating
    0
    dedarshan is on a distinguished road

      0  

    Default IE 11 issue for Smart LEgend

    Hi, I have implemented smart legend in ext.net mvc application this legend does not get rendered fine in IE 11.

    Any help would be gr8

    Please find the below image:

    snapshot.jpg

  6. #26
    Sencha Premium Member
    Join Date
    Aug 2012
    Location
    Pune, India
    Posts
    10
    Vote Rating
    0
    sridharstays is on a distinguished road

      0  

    Question Compatibility with v5

    @nohuhu,

    Is this extension compatible only with v4.x and not v5?

    -Sridhar

  7. #27
    Sencha - Ext JS Dev Team nohuhu's Avatar
    Join Date
    Jun 2011
    Location
    Redwood coast
    Posts
    295
    Vote Rating
    55
    nohuhu has disabled reputation

      0  

    Default

    Sridhar,

    Honestly I never tried it with 5.x but theoretically it should work. There were not many changes to the legacy charts since 4.x days.

    Regards,
    Alex.
    Regards,
    Alex.