You found a bug! We've classified it as EXTJS-8929 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    157
    Vote Rating
    9
    ZachG will become famous soon enough

      0  

    Default [4.1.3] Scatter chart with manually added data doesn't render with minimum/maximum

    [4.1.3] Scatter chart with manually added data doesn't render with minimum/maximum


    REQUIRED INFORMATION




    Ext version tested:
    • Ext 4.1.3.548
    Browser versions tested against:
    • Chrome
    Description:
    • There is a scatter chart with minimum/maximum values for the axes.
    • When all data is loaded initially, it works fine.
    • When data is added in one record at a time, it does not render the points.
    Steps to reproduce the problem:The result that was expected:
    • Points would be rendered.
    The result that occurs instead:
    • Nope
    Test Case:


    Code:
    Ext.onReady(function()    {
        var minimum = undefined;
        var maximum = undefined;
    
    
        var store = Ext.create("Ext.data.Store", {
            proxy:{
                type:"memory",
                reader:"json"
            },
            model:Ext.define("MyModel", {
                extend:"Ext.data.Model",
                fields:[
                    "x",
                    "y"
                ]
            }) && "MyModel"
        });
    
    
        var myWindow = Ext.create("Ext.window.Window", {
            title:Ext.versions.core.version + " (Min: " + minimum + ", Max: " + maximum + ")",
            width:500,
            height:500,
            layout:"border",
            items:[
                {
                    xtype:"chart",
                    region:"center",
                    store:store,
                    axes:[
                        {
                            type:"Numeric",
                            position:"bottom",
                            fields:["x"],
                            minimum:minimum,
                            maximum:maximum
                        },
                        {
                            type:"Numeric",
                            position:"left",
                            fields:["y"],
                            minimum:minimum,
                            maximum:maximum
                        }
                    ],
                    series:[
                        {
                            type:"scatter",
                            axis:false,
                            xField:"x",
                            yField:"y",
                            markerConfig:{
                                type:"circle"
                            }
                        }
                    ]
                },
                {
                    xtype:"grid",
                    store:store,
                    columns:[
                        {
                            text:"X",
                            dataIndex:"x"
                        },
                        {
                            text:"Y",
                            dataIndex:"y"
                        }
                    ],
                    forceFit:true,
                    region:"south",
                    height:100
                }
            ],
            dockedItems:[
                {
                    xtype:"toolbar",
                    items:[
                        {
                            text:"Add Record",
                            handler:function()    {
                                store.add({
                                    x:Math.random() * 100,
                                    y:Math.random() * 100
                                });
                            }
                        }
                    ]
                }
            ]
        });
        myWindow.show();
    });





    HELPFUL INFORMATION



    Debugging already done:
    • When rendering points, the getChartStore() method is called.
    • The this.substore is created when the chart is first being rendered.
    • When adding new records, this.substore is not getting new records within the minimum/maximum bounds.
    • By calling chart.setSubStore(null)‚Äč before adding new records, having defined minimum/maximum bounds does work.
    Attached Images

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,207
    Vote Rating
    856
    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


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

  3. #3
    Sencha Premium Member
    Join Date
    May 2009
    Posts
    157
    Vote Rating
    9
    ZachG will become famous soon enough

      0  

    Default


    Damn, that was fast. Thanks.

    I'll try it in the 4.2 nightly build soon.


    Edit: Yeah, still happening in 4.2.0.617

Thread Participants: 1