Threaded View
-
29 Oct 2012 1:39 PM #1
[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
- Firefox 16
- IE9
- Opera 12.10
- 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.
- Execute the code below
- Top Label of y-Axis showing "2"
- Top Label shows "3" insteat, a wrong value.
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
- don't know
- only default ext-all.css
- Windows 7 Prof.
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote