PDA

View Full Version : [DUP] Creating a chart causes "Cannot read property 'nullGutters' of undefined" error



wsi
14 Jan 2013, 4:16 PM
REQUIRED INFORMATION
Ext version tested:

Ext 4.2.0.179
Browser:

24.0.1312.52 m
Description:

Creating a chart causes the following javascript error:
Uncaught TypeError: Cannot read property 'nullGutters' of undefined - ext-all-dev.js:75805.

Steps to reproduce the problem:

Create a model.
Create a store that uses the created model.
Create a chart that uses the created store. The chart should have axes and render to Ext.getBody()
The result that was expected:

A chart that looks like the following:
http://docs.sencha.com/ext-js/4-1//images/Ext.chart.Chart/Ext.chart.Chart1.png
The result that occurs instead:

Nothing is rendered
Test Case:


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Chart Test</title>
<link rel="stylesheet" type="text/css" href="third_party/sencha/resources/css/ext-all.css" />
<script type="text/javascript" src="third_party/sencha/bootstrap.js"></script>


<script type="text/javascript">
Ext.onReady( function() {
Ext.define('WeatherPoint', {
extend: 'Ext.data.Model',
fields: ['temperature', 'date']
});

var store = Ext.create('Ext.data.Store', {
model: 'WeatherPoint',
data: [
{ temperature: 58, date: new Date(2011, 1, 1, 8) }
]
});

var chartPanel = Ext.create('Ext.chart.Chart', {
renderTo: Ext.getBody(),
width: 400,
height: 300,
store: store,
axes: [
{
title: 'Temperature',
type: 'Numeric',
position: 'left',
fields: ['temperature'],
minimum: 0,
maximum: 100
},
{
title: 'Time',
type: 'Time',
position: 'bottom',
fields: ['date'],
dateFormat: 'ga'
}
]
});
});


</script>
</head>
<body scroll="no">


</body>
</html>

evant
14 Jan 2013, 5:04 PM
This has been posted: http://www.sencha.com/forum/showthread.php?253591-Ext-4.2.0-Beta2-Creating-a-chart-without-a-series&goto=newpost

Thanks for the test case.