Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    2
    Vote Rating
    0
    Chris79 is on a distinguished road

      0  

    Default [4.1.1a] Problem with minimum, maximum, majorTickSteps and y-Axis-Label

    [4.1.1a] Problem with minimum, maximum, majorTickSteps and y-Axis-Label


    Hello!
    Today i stumbled across something that imho is a bug.

    REQUIRED INFORMATION


    Ext version tested:
    • Ext 4.1.1a
    Browser versions tested against:
    • Firefox 16
    • IE9
    • Opera 12.10
    Description:
    • Setting minimum and maximum of a numeric axis (in my example the left one) to a difference of 1 and setting majorTickSteps to 0 (for example minimum: 1, maximum: 2, majorTickSteps: 0) leads to an incorrect Toplabel. Insteat of 2 (in this example) it shows 3. It shows alway one more, so, if you have a minimum of 222 and a maximum of 223 and 0 majorTickSteps, the Toplabel of the Axis shows 224.
    Steps to reproduce the problem:
    • Execute the code below
    The result that was expected:
    • Top Label of y-Axis showing "2"
    The result that occurs instead:
    • Top Label shows "3" insteat, a wrong value.
    Test Case:

    a very simple example, only to reproduce the bug:
    Code:
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <title>chartbug Example</title>
    
        <link rel="stylesheet" type="text/css" href="ext-4.1.1a/resources/css/ext-all.css" />
        <script type="text/javascript" src="ext-4.1.1a/ext-all-debug.js"></script>
    </head>
    <body>
    <script>
    Ext.onReady(function(){
      
     graphstore = Ext.create('Ext.data.Store', {
         fields:[
                'xwert1',
                'xwert2',
                'ywert1',
                'ywert2',
                'z'
                ],
         data: [
            {xwert1: 10.0, xwert2: 10.0, ywert1: 1.2, ywert2: 1.6, z: 5},
            {xwert1: 20.0, xwert2: 20.0, ywert1: 1.4, ywert2: 1.8, z: 10},
            {xwert1: 30.0, xwert2: 30.0, ywert1: 1.6, ywert2: 1.9, z: 15},
            {xwert1: 40.0, xwert2: 40.0, ywert1: 1.7, ywert2: 1.95, z: 20}
        ]
     });
     graphstore.load();
    
     var mychart = Ext.create('Ext.chart.Chart', {
                xtype: 'chart',
                style: 'background:#fff',
                animate: false,
                store: graphstore,
                shadow: true,
                width: 600,
                height: 360,
                renderTo: Ext.getBody(),
                theme: 'Category1',
                legend: {
                    position: 'right'
                },
                axes: [{
                     type: 'Numeric',
                    position: 'left',
                    fields: ['ywert1', 'ywert2'],
                    title: 'y',
                    minimum: 1,
                    maximum: 2,
                    majorTickSteps: 0,
                    grid: {
                        odd: {
                            opacity: 1,
                            fill: '#ddd',
                            stroke: '#bbb',
                            'stroke-width': 0.5
                        }
                    }
                }, {
                    type: 'Numeric',
                    position: 'bottom',
                    fields: ['xwert1', 'xwert2'],
                    title: 'x'
                }],
                series: [{
                    type: 'line',
                    highlight: {
                        size: 7,
                        radius: 7
                    },
                    axis: 'left',
                    xField: 'xwert1',
                    yField: 'ywert1',
                    smooth: true,
                    markerConfig: {
                        type: 'cross',
                        size: 4,
                        radius: 4,
                        'stroke-width': 0
                    }
                }, {
                    type: 'line',
                    highlight: {
                        size: 7,
                        radius: 7
                    },
                    axis: 'left',
                    xField: 'xwert2',
                    yField: 'ywert2',
                    smooth: true,
                    markerConfig: {
                        type: 'cross',
                        size: 4,
                        radius: 4,
                        'stroke-width': 0
                    }
                }]
            });
    });
    
    </script>
    </body>
    </html>


    HELPFUL INFORMATION


    Screenshot:Debugging already done:
    • none
    Possible fix:
    • don't know
    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • Windows 7 Prof.

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,953
    Vote Rating
    636
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    I just ran your code with the latest source build and it appears this is already resolved. Thanks for the test case.
    Attached Images
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1

Tags for this Thread