Results 1 to 3 of 3

Thread: Chart is not show in IE8 it OK in Firefox

  1. #1

    Default Chart is not show in IE8 it OK in Firefox

    this code

    Ext.chart.Chart.CHART_URL = '../../ScriptExtjs/resources/charts.swf?nocache='+Math.floor(Math.random()*10000);

    Ext.onReady(function() {

    var store = new Ext.data.JsonStore({
    fields: ['name', 'visits', 'views'],
    data: [
    { name: 'Jul 07', visits: 245000, views: 3000000 },
    { name: 'Aug 07', visits: 240000, views: 3500000 },
    { name: 'Sep 07', visits: 355000, views: 4000000 },
    { name: 'Oct 07', visits: 375000, views: 4200000 },
    { name: 'Nov 07', visits: 490000, views: 4500000 },
    { name: 'Dec 07', visits: 495000, views: 5800000 },
    { name: 'Jan 08', visits: 520000, views: 6000000 },
    { name: 'Feb 08', visits: 620000, views: 7500000 }
    ]
    });

    // extra extra simple
    new Ext.Panel({
    title: 'ExtJS.com Visits Trend, 2007/2008 (No styling)',
    renderTo: 'totalemp',
    width: "100%",
    height: 250,
    layout: 'fit',
    items: {

    xtype: 'linechart',
    store: store,
    xField: 'name',
    yField: 'visits',
    listeners: {
    itemclick: function(o) {
    var rec = store.getAt(o.index);
    Ext.example.msg('Item Selected', 'You chose {0}.', rec.get('name'));
    }
    }
    }
    });





    new Ext.Panel({
    title: 'ExtJS.com Visits and Pageviews, 2007/2008 (Full styling)',
    renderTo: 'salary',
    width: "100%",
    height: 250,
    layout: 'fit',

    items: {
    xtype: 'columnchart',
    store: store,
    url: '../../ScriptExtjs/resources/charts.swf?nocache=1000',
    xField: 'name',
    yAxis: new Ext.chart.NumericAxis({
    displayName: 'Visits',
    labelRenderer: Ext.util.Format.numberRenderer('0,0')
    }),
    tipRenderer: function(chart, record, index, series) {
    if (series.yField == 'visits') {
    return Ext.util.Format.number(record.data.visits, '0,0') + ' visits in ' + record.data.name;
    } else {
    return Ext.util.Format.number(record.data.views, '0,0') + ' page views in ' + record.data.name;
    }
    },
    chartStyle: {
    padding: 10,
    animationEnabled: true,
    font: {
    name: 'Tahoma',
    color: 0x444444,
    size: 11
    },
    dataTip: {
    padding: 5,
    border: {
    color: 0x99bbe8,
    size: 1
    },
    background: {
    color: 0xDAE7F6,
    alpha: .9
    },
    font: {
    name: 'Tahoma',
    color: 0x15428B,
    size: 10,
    bold: true
    }
    },
    xAxis: {
    color: 0x69aBc8,
    majorTicks: { color: 0x69aBc8, length: 4 },
    minorTicks: { color: 0x69aBc8, length: 2 },
    majorGridLines: { size: 1, color: 0xeeeeee }
    },
    yAxis: {
    color: 0x69aBc8,
    majorTicks: { color: 0x69aBc8, length: 4 },
    minorTicks: { color: 0x69aBc8, length: 2 },
    majorGridLines: { size: 1, color: 0xdfe8f6 }
    }
    },
    series: [{
    type: 'column',
    displayName: 'Page Views',
    yField: 'views',
    style: {
    image: 'bar.gif',
    mode: 'stretch',
    color: 0x99BBE8
    }
    }, {
    type: 'line',
    displayName: 'Visits',
    yField: 'visits',
    style: {
    color: 0x15428B
    }
    }]
    }
    });


    });

  2. #2
    Sencha Premium User mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    3,153

    Default

    Just a guess, your width declaration should be in pixels. From the docs:

    width : Number
    The width of this component in pixels (defaults to auto). Note to express this dimension as a percentage or offset se...
    The width of this component in pixels (defaults to auto)

  3. #3

    Default

    I set width is 470 and height is 300 it not show In IE but it work in Firefox

Similar Threads

  1. Replies: 0
    Last Post: 4 Jun 2010, 7:21 AM
  2. ExtJS 3.2 - Debugging IE8/7 vs. Firefox
    By httpdotcom in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 13 Apr 2010, 1:03 PM
  3. [FIXED][3.0rc1.1] Chart Problem in IE8
    By nicholasnet in forum Ext 3.x: Bugs
    Replies: 3
    Last Post: 23 Jun 2009, 10:57 AM

Posting Permissions

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