You found a bug! We've classified it as EXTJSIV-8796 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    687
    Vote Rating
    62
    Daniil is a jewel in the rough Daniil is a jewel in the rough Daniil is a jewel in the rough Daniil is a jewel in the rough

      0  

    Default [4.2.0 RC] NumericAxis minimum adjust issue if < 1

    [4.2.0 RC] NumericAxis minimum adjust issue if < 1


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.0 RC
    Browser versions tested against:
    • FireFox
    • Chrome
    • IE9
    DOCTYPE tested against:
    • <!DOCTYPE html>
    Description:
    • The NumericAxis' minimum seems to be auto-calculated incorrectly if it should fall between 0 and 1.
    • In the test case I provide another dataset there the minimum is auto-calculated correctly if it is > 1.
    Steps to reproduce the problem:
    • Just run the sample
    The result that was expected:
    • The minimum is about 0.7 (likewise 70 with another dataset).
    The result that occurs instead:
    • The minimum is 0.
    Test Case:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <title>NumericAxis adjust minimum issue if < 1</title>
    
        <link rel="stylesheet" href="../resources/css/ext-all.css" />
        
        <script src="../ext-all-debug.js"></script>
    
        <script>
            Ext.onReady(function () {
                Ext.create("Ext.panel.Panel", {
                    renderTo: Ext.getBody(),
                    height: 400,                
                    width: 400,
                    layout: "fit",
                    title: "Chart",
                    items: [{
                        xtype: "chart",
                        axes: [{
                            position: "left",
                            fields: ["Value"],
                            type: "Numeric"
                        }, {
                            position: "bottom",
                            fields: ["XField"],
                            type: "Category"
                        }],
                        series: [{
                            xField: "XField",
                            yField: "Value",
                            type: "line"
                        }],
                        store: {
                            fields: [{
                                name: "XField"
                            }, {
                                name: "Value"
                            }],
                            data: [{
                                XField: "Jan",
                                Value: 0.75
                            }, {
                                XField: "Feb",
                                Value: 0.80
                            }, {
                                XField: "Mar",
                                Value: 0.85
                            }, {
                                XField: "Apr",
                                Value: 0.90
                            }, {
                                XField: "May",
                                Value: 0.80
                            }, {
                                XField: "Jun",
                                Value: 0.75
                            }, {
                                XField: "Jul",
                                Value: 0.85
                            }]
                            //data: [{
                            //    XField: "Jan",
                            //    Value: 75
                            //}, {
                            //    XField: "Feb",
                            //    Value: 80
                            //}, {
                            //    XField: "Mar",
                            //    Value: 85
                            //}, {
                            //    XField: "Apr",
                            //    Value: 90
                            //}, {
                            //    XField: "May",
                            //    Value: 80
                            //}, {
                            //    XField: "Jun",
                            //    Value: 75
                            //}, {
                            //    XField: "Jul",
                            //    Value: 85
                            //}]
                        }
                    }]                
                });
            });
        </script>
    </head>
    <body>
    
    </body>
    </html>


    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,656
    Vote Rating
    435
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


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