Chris
Chris

Reputation: 7855

PieChart is not displaying anything

I have a Ext.chart.Chart of the type "Pie" and i have a store with autoload and data like this:

[
 {name : 'Firefox', value: 50}
 {name : 'IE', value: 30}
 {name : 'Safari', value: 10}
 {name : 'Others', value: 10}
]

the "field" property of the Chart is "value".

The complete Chart Object is then added to a Panel on the site. I first thought, that the PieChart is not drawn but in the DOM i have this:

<div id="chartCmp" class="x-surface x-surface-default" role="presentation">
 <svg  xmlns="http://www.w3.org/2000/svg" version="1.1" width="undefined" height="undefined" id="ext-gen1053">
   <defs>[...]</defs>
   <rect width="100%" height="100%" fill="#000" stroke="none" opacity="0" id="ext-gen1054"/>
 </svg>
</div>

(i shortened at the [...]) to make the code readable here.

So as you can see there is a svg Element with defs of LinearGradients and an unvisible rect Element in it. I cannot understand, why the data is not displayed! I've been working on this for days now.

any suggestions?

Upvotes: 1

Views: 1897

Answers (1)

Chris
Chris

Reputation: 7855

I had to do "doComponentLayout()", with and give a fixed with and height. Otherwise the PieChart won't show up.

Upvotes: 1

Related Questions