1. #1
    Sencha User
    Join Date
    Dec 2008
    Posts
    89
    Vote Rating
    0
    janhov is on a distinguished road

      0  

    Default Unanswered: Error when trying to show area chart label

    Unanswered: Error when trying to show area chart label


    (Using 4.0.2a)

    Hi, I have column and bar charts working nicely with labels. But when I add

    Code:
    label: {
        display: 'middle',
        color: '#000',
        'text-anchor': 'middle',
        font: 'normal 11px arial',
        field: <seriesField>,
        renderer: Ext.util.Format.numberRenderer('0,0')
    }
    to my area chart Firebug says:

    item.point is undefined

    'x': item.point[0]
    ext-all-debug.js (line 46593)

    The item has pointsDown, pointsUp, series and sprite, but no point.

    Chrome JS Console says:

    Uncaught TypeError: Cannot read property '0' of undefined
    Ext.define.onCreateLabel ext-all-debug.js:46593
    Ext.define.renderLabels ext-all-debug.js:42289
    Ext.define.drawSeries ext-all-debug.js:46571
    Ext.define.drawCharts ext-all-debug.js:42017
    Ext.define.each ext-all-debug.js:17290
    Ext.define.redraw ext-all-debug.js:41613
    Ext.define.afterComponentLayout ext-all-debug.js:41565
    Ext.define.afterLayout ext-all-debug.js:16035
    Ext.define.layout ext-all-debug.js:15602
    Ext.define.doComponentLayout ext-all-debug.js:20285
    Ext.define.setSize ext-all-debug.js:20181
    Ext.define.afterRender ext-all-debug.js:18921
    Base.callParent ext-all-debug.js:2833
    Ext.define.afterRender ext-all-debug.js:27278
    Base.callParent ext-all-debug.js:2833
    Ext.define.afterRender ext-all-debug.js:41621
    Ext.define.render ext-all-debug.js:18822
    Ext.define.renderItem ext-all-debug.js:15670
    Ext.define.renderItems ext-all-debug.js:15634
    Ext.define.renderChildren ext-all-debug.js:15618
    Ext.define.beforeLayout ext-all-debug.js:15612
    Base.callParent ext-all-debug.js:2833
    Ext.define.beforeLayout ext-all-debug.js:27919
    Ext.define.layout ext-all-debug.js:15596
    Ext.define.doLayout ext-all-debug.js:28157
    Ext.define.add ext-all-debug.js:28291
    <my app>
    Ext.apply.callback ext-all-debug.js:5022
    Ext.define.onComplete ext-all-debug.js:21018
    Ext.define.onStateChange ext-all-debug.js:20979
    (anonymous function) ext-all-debug.js:1503


    I guess I am doing something wrong?

  2. #2
    Ext JS Premium Member Asken's Avatar
    Join Date
    Feb 2010
    Location
    sweden
    Posts
    118
    Vote Rating
    0
    Answers
    2
    Asken is an unknown quantity at this point

      0  

    Default


    A little more code would be helpful...

  3. #3
    Sencha User
    Join Date
    Dec 2008
    Posts
    89
    Vote Rating
    0
    janhov is on a distinguished road

      0  

    Default


    Tried to reproduce it in a small separate example, but then I did't get any messages (still no labels, tho). So the problem here seems to lie between the chair and the keyboard..

    Anyway, I'm not able to get labels for line or area charts at all (and no messages). Is it any different for these two chart types? The docs describe line and area labels the same way as other types.

  4. #4
    Ext JS Premium Member Asken's Avatar
    Join Date
    Feb 2010
    Location
    sweden
    Posts
    118
    Vote Rating
    0
    Answers
    2
    Asken is an unknown quantity at this point

      0  

    Default


    I created a jsfiddle from the ExtJS examples you can play with where the labels do work. Maybe you can try to replace what's in there with what you have...

    http://jsfiddle.net/4GFpR/41/

Thread Participants: 1