Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Jan 2010
    Location
    Italy
    Posts
    17
    Vote Rating
    0
    salgaf is on a distinguished road

      0  

    Default Column chart and negative numbers

    Column chart and negative numbers


    Hi,
    I have problem displaying column chart with negative numbers.

    Using this code:
    Code:
    var store = Ext.create('Ext.data.JsonStore', {
        fields: ['name', 'data1'],
        data: [
            { 'name': 'metric one',   'data1': -10 },
            { 'name': 'metric two',   'data1': -100 },
            { 'name': 'metric three', 'data1': -100 },
            { 'name': 'metric four',  'data1': -100 },
            { 'name': 'metric five',  'data1': -100 }
        ]
    });
    
    Ext.create('Ext.chart.Chart', {
        renderTo: Ext.getBody(),
        width: 500,
        height: 300,
        animate: true,
        store: store,
        axes: [
            {
                type: 'Numeric',
                position: 'left',
                fields: ['data1'],
                label: {
                    renderer: Ext.util.Format.numberRenderer('0,0')
                },
                title: 'Sample Values',
                grid: true
            },
            {
                type: 'Category',
                position: 'bottom',
                fields: ['name'],
                title: 'Sample Metrics'
            }
        ],
        series: [
            {
                type: 'column',
                axis: 'left',
                highlight: true,
                tips: {
                  trackMouse: true,
                  width: 140,
                  height: 28,
                  renderer: function(storeItem, item) {
                    this.setTitle(storeItem.get('name') + ': ' + storeItem.get('data1') + ' $');
                  }
                },
                label: {
                  display: 'insideEnd',
                  'text-anchor': 'middle',
                    field: 'data1',
                    renderer: Ext.util.Format.numberRenderer('0'),
                    orientation: 'vertical',
                    color: '#333'
                },
                xField: 'name',
                yField: 'data1'
            }
        ]
    });
    have this result

    chart.JPG
    Searching in the forum I found this:
    http://www.sencha.com/forum/showthre...805#post662805
    but doesn't help.
    I also tried with ext-4.1.0 beta 3 but the same.
    Anyone know if is still a bug to be solved?
    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,124
    Vote Rating
    855
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This has been fixed in the next major working of Charts http://www.sencha.com/forum/showthread.php?147858
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Mar 2012
    Posts
    27
    Vote Rating
    1
    RuBenKlunZ is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    This has been fixed in the next major working of Charts http://www.sencha.com/forum/showthread.php?147858
    It seems that the fix is for Touch Charts and not ExtJS. When can we expect a fix for that?

Thread Participants: 2