Results 1 to 2 of 2

Thread: Problem with Chart Time Axis

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    1
    Vote Rating
    0
      0  

    Default Problem with Chart Time Axis

    I have Line Chart with time axis (declaration is shown below):
    ..................................
    {
    type: "Time",
    dateFormat: "d/m H:i",
    position: "bottom",
    fields: ["X"],
    groupBy: 'year,month,day,hour,minute',
    constrain: true,
    fromDate: new Date('1/1/11'),
    toDate: new Date('1/2/11'),


    step: [Ext.Date.HOUR, 1]
    }],
    ..........................................

    The range for time axis changes by Ext.data.Store :


    "load": function(me, records, successful, operation, Opts){
    var chart = Ext.getCmp("chartCmp");
    var timeAxis = chart.axes.get(1);
    timeAxis.fromDate = me.data.first().get("X");
    timeAxis.toDate = me.data.last().get("X");
    chart.redraw();
    }

    Data model for chart declared like this:


    Ext.define("rtChartData", {
    extend: "Ext.data.Model",
    fields: [
    {name: "id", type: "int"},
    {name: "Y", type: "int"},
    {name: "X", type: "date"},
    {name: "prelim", type: "string"},
    {name: "label", type: "string"}
    ]
    });



    This code works perfectly in Chrome, but not in IE8 (time axis don't scaling). ExtJS version is 4.0.1.
    How to fix this problem?!

    Best regards!

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,060
    Answers
    3976
    Vote Rating
    1389
      0  

    Default

    Please post in the appropriate forum. I have moved this to the Ext JS 4 Q&A forum. Also, please wrap your code in the code tags.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •