Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-10654 in 4.2.2.1144.
  1. #1
    Sencha User
    Join Date
    May 2012
    Location
    Bangalore
    Posts
    95
    Vote Rating
    1
    Rameshlamani is on a distinguished road

      1  

    Default In Line graph, Why x-axis month year is not coming proper?

    In Line graph, Why x-axis month year is not coming proper?


    I have done application using Extjs 4.1. I have plotted line graph, in this x-axis date format is not coming proper. I have defined fromdate, todate and date format, but duplicating December month, Feb month is not coming. line is plotting proper. for more reference have attached images. Can any body tell me how to resolve this issue?. Great appropriated. Thank you.
    LineGraph.png

    Code is here:


    Code:
        {
                type:'Time',
                step: [Ext.Date.MONTH,1] ,
                position:'bottom',
                fields:['Month'],
                fromDate: new Date('12/1/12'),
                toDate: new Date('6/1/13'),
                grid: true,
                dateFormat: 'M Y',
                constrain: true,   
          }
    *EDIT BY SLEMMON
    Issue observed in 4.1.x +
    Inline test case:
    Code:
    var store = Ext.create('Ext.data.Store', {
        "fields": [{
            "name": "month",
            "type": "date"
        }, {
            "name": "used",
            "type": "float"
        }, {
            "name": "capacity",
            "type": "float"
        }],
        "data": [{
            "month": "2013\/01\/01 00:00",
            "capacity": 69.0,
            "used": 32.0
        }, {
            "month": "2013\/02\/01 00:00",
            "capacity": 60.0,
            "used": 39.0
        }, {
            "month": "2013\/03\/01 00:00",
            "capacity": 62.0,
            "used": 28.0
        }, {
            "month": "2013\/04\/01 00:00",
            "capacity": 65.0,
            "used": 12.0
        }, {
            "month": "2013\/05\/01 00:00",
            "capacity": 68.0,
            "used": 8.0
        }, {
            "month": "2013\/06\/01 00:00",
            "capacity": 60.0,
            "used": 3.0
        }, {
            "month": "2013\/07\/01 00:00",
            "capacity": 69.0,
            "used": 0.0
        }, {
            "month": "2013\/08\/01 00:00",
            "capacity": 65.0,
            "used": 0.0
        }, {
            "month": "2013\/09\/01 00:00",
            "capacity": 64.0,
            "used": 0.0
        }, {
            "month": "2013\/10\/01 00:00",
            "capacity": 69.0,
            "used": 0.0
        }, {
            "month": "2013\/11\/01 00:00",
            "capacity": 62.0,
            "used": 0.0
        }, {
            "month": "2013\/12\/01 00:00",
            "capacity": 62.0,
            "used": 9.0
        }]
    });
    var chart = Ext.create('Ext.chart.Chart', {
        "series": [{
            "type": "column",
            "xField": "month",
            "yField": ["capacity", "used"],
            tips: {
                trackMouse: true,
                width: 140,
                height: 28,
                renderer: function (storeItem, item) {
                    this.update(Ext.Date.format(storeItem.get('month'), 'M Y'));
                }
            }
        }],
        "renderTo": document.body,
        "height": 300,
        "animate": true,
        "store": store,
        "width": 1000,
        "axes": [{
            "position": "left",
            "title": "Shifts",
            "grid": true,
            "type": "Numeric",
            "fields": ["capacity", "used"]
        }, {
            "position": "bottom",
            "dateFormat": "M Y",
            "type": "Time",
            "step": [Ext.Date.MONTH, 1],
            "fields": ["month"]
        }]
    });
    Last edited by slemmon; 12 Jul 2013 at 3:12 PM. Reason: additional test notes

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Vote Rating
    202
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Do you have a more complete example I / the community can test with (including your code + data used to populate a chart) that would demonstrate the issue you're seeing?

    Also, do you see the issue if you test your code on 4.2.1? A number of bug fixes have come through in the releases since 4.1.1.
    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

  3. #3
    Sencha User
    Join Date
    Jan 2013
    Posts
    7
    Vote Rating
    0
    Arho is on a distinguished road

      0  

    Default


    I have noticed the same behavior when using a step of one month on the time axis (ExtJS 4.2.1). Here is an example:

    Code:
        var store = Ext.create('Ext.data.Store', {
            "fields": [{
                "name": "month",
                "type": "date"
            }, {
                "name": "used",
                "type": "float"
            }, {
                "name": "capacity",
                "type": "float"
            }],
            "data": [{
                "month": "2013\/01\/01 00:00",
                "capacity": 69.0,
                "used": 32.0
            }, {
                "month": "2013\/02\/01 00:00",
                "capacity": 60.0,
                "used": 39.0
            }, {
                "month": "2013\/03\/01 00:00",
                "capacity": 62.0,
                "used": 28.0
            }, {
                "month": "2013\/04\/01 00:00",
                "capacity": 65.0,
                "used": 12.0
            }, {
                "month": "2013\/05\/01 00:00",
                "capacity": 68.0,
                "used": 8.0
            }, {
                "month": "2013\/06\/01 00:00",
                "capacity": 60.0,
                "used": 3.0
            }, {
                "month": "2013\/07\/01 00:00",
                "capacity": 69.0,
                "used": 0.0
            }, {
                "month": "2013\/08\/01 00:00",
                "capacity": 65.0,
                "used": 0.0
            }, {
                "month": "2013\/09\/01 00:00",
                "capacity": 64.0,
                "used": 0.0
            }, {
                "month": "2013\/10\/01 00:00",
                "capacity": 69.0,
                "used": 0.0
            }, {
                "month": "2013\/11\/01 00:00",
                "capacity": 62.0,
                "used": 0.0
            }, {
                "month": "2013\/12\/01 00:00",
                "capacity": 62.0,
                "used": 9.0
            }]
        });
        var chart = Ext.create('Ext.chart.Chart', {
            "series": [{
                "type": "column",
                "xField": "month",
                "yField": ["capacity", "used"]
            }],
            "renderTo": "codeoutput",
            "height": 300,
            "animate": true,
            "store": store,
            "width": 1000,
            "axes": [{
                "position": "left",
                "title": "Shifts",
                "grid": true,
                "type": "Numeric",
                "fields": ["capacity", "used"]
            }, {
                "position": "bottom",
                "dateFormat": "M Y",
                "type": "Time",
                "step": [Ext.Date.MONTH, 1],
                "fields": ["month"]
            }]
        });
    However, if I use a step of 0.5 then the months get rendered correctly.

  4. #4
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    5,470
    Vote Rating
    202
    slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of slemmon has much to be proud of

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  5. #5
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    975
    Vote Rating
    110
    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


    It would be nice to get it fixed ever
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,085
    Vote Rating
    467
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      1  

    Default


    This seems to be corrected in 4.2.3 nightly

    Screen Shot 2014-05-20 at 2.57.50 PM.jpg