PDA

View Full Version : Problem with grid-odd-fill



kbu
10 Jan 2013, 1:43 AM
Hallo!

Can anybody help with my problem?
https://picasaweb.google.com/108860862466016490702/Web?authuser=0&authkey=Gv1sRgCLuahvGL-M-e4gE&feat=directlink

How i can fix this grey horizontal bars?

right now i disabled

grid: {
odd: {
opacity: 1,
/*fill: '#ddd',*/
stroke: '#bbb',
'stroke-width': 1
}
},

but on docs must be fill....

friend
10 Jan 2013, 6:27 AM
I've seen this problem occur when your chart is rendered before the data store has finished loading.

kbu
10 Jan 2013, 6:28 AM
Please, tell me, how i can fix this?

friend
10 Jan 2013, 6:36 AM
How you do this depends on the architecture of your application. If using MVC, be sure that your data store is referenced in your Controller configuration:



Ext.define('MyApp.controller.SomeController', {
extend: 'Ext.app.Controller',
views: ['myChartView'],
stores: ['myChartStore'],
<...>
});


You'll also probably want to set autoLoad: true in your store configuration.

If not using MVC, you'll need to manually ensure that your app creates/loads your data store prior to rendering your chart.

kbu
10 Jan 2013, 6:51 AM
Here is my code...

can you help me fix this problem?

friend
10 Jan 2013, 7:45 AM
A corporate proxy/firewall prevents me from accessing pastebin. Can you please use http://jsfiddle.net/ instead?

kbu
10 Jan 2013, 7:46 AM
http://jsfiddle.net/BwGBP/

Thx!

friend
10 Jan 2013, 11:20 AM
Since your code is one big procedural block, it makes it hard to ensure that the store associated with the problematic chart is loaded prior to the chart being rendered.

The first, simplest thing to try is ensure that the first load of your chart's store is actually returning data and not nulls.

The next thing I would try is this:


Define your chart first, then define its associated store.
Remove the store attribute from your chart's configuration completely.
In the load() event of the chart's store, call yourChart.bindStore(store, true);

In this scenario, the Chart is created/instantiated first, then the store is created/instantiated and since autoLoad: true is set, the load event will fire after the store is fully loaded. Binding the store to the chart after the store is fully loaded should fix the problem.

I'm beginning to wonder if a bug report should be opened for this issue...

kbu
10 Jan 2013, 11:49 PM
Thx for your reply!!I will try fix it..