During the last few hours I was playing around with Ext JS charts. I got stuck for a while because the height of my y-axis was limited to one; no matter what I tried and how high the numbers of my records were – the y-scale was fixed to 1.

After some time I figured out that there’s a problem with PHP’s json_encode(). Due to that problem I formatted the data for my chart as strings (with quotation marks) instead of integers (without quotation marks).
There are two solutions to fix this problem: First, you can make sure that the PHP variables that contain integers are really numeric types (and not strings). The second, much easier solution, is to properly define the Ext JS fields for the charts:
fields = [
{name: 'interval'},
{name: 'field1', type: 'int'},
{name: 'field2', type: 'int'}
];
And that’s it!
Autor: Andre Kolell
Datum: Freitag, 28. August 2009, um 15:58 Uhr
Themen: (Web) Development, Ext JS
Trackback: Trackback-URL | Feed zum Beitrag: RSS 2.0