1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    8
    Vote Rating
    0
    Answers
    1
    manikumar is on a distinguished road

      0  

    Default Answered: values not rendered in line chart, if xField is not given in extjs 4.1

    Answered: values not rendered in line chart, if xField is not given in extjs 4.1


    I have problem in line chart in extjs 4.1.0. when upgraded to ext js 4.1.0 from 4.0.2a values not rendered in line chart, if xField is not given but in extjs 4.02a, values are rendered if xField is not given. here is code that is working in extjs 4.0.2a:


    xtype: 'chart',
    height: 120,
    id: 'accounts-per-day-chart',
    insetPadding: 5,
    store: 'CustomersStore',
    flex: 5,
    series: [
    {
    type: 'line',
    highlight: true,
    yField: [
    'Customers'
    ],
    fill: true,

    selectionTolerance: 5
    }
    ],
    axes: [
    {
    type: 'Numeric',
    dashSize: 2,
    fields: [
    'Customers'
    ],
    majorTickSteps: 0,
    position: 'left',
    decimals: 0,
    minimum: 0
    }
    ]
    }


    is xField mandatory in extjs 4.1.0? please suggest solution to render values in line chart with out declaring value for xField

  2. After r&d, came to know that declaring xField is mandatory in extjs 4.1. added xField in line series and it worked for me ..here is the working code.
    NOTE: xField values should be UNIQUE
    xtype: 'chart',
    height: 120,
    id: 'accounts-per-day-chart',
    insetPadding: 5,
    store: 'CustomersStore',
    flex: 5,
    series: [
    {
    type: 'line',
    highlight: true,
    yField: [
    'Customers'
    ],
    xField: [
    'Time'
    ],
    fill: true,
    selectionTolerance: 5
    }
    ],
    axes: [
    {
    type: 'Numeric',
    dashSize: 2,
    fields: [
    'Customers'
    ],
    majorTickSteps: 0,
    position: 'left',
    decimals: 0,
    minimum: 0
    }
    ]
    }