amCharts support forum

You are not logged in.

Announcement

FORUM CLOSED! This forum is closed. We moved to a new place at Zendesk. Update your bookmarks.

Flash Charts: Flash Stock Chart


#1 2012-06-25 10:53:43

fatemeh
Member

Error in generating large amounts of graphs at run time!!

I need to have a stock chart which it's number of graphs are changed dynamically , at run time. I have a loop to generate the graphs and field mapping. for less than 50 graphs per panel, it works perfectly, but when i'm trying to generate 100 graphs per panel(i have three panel), I get this error :
a script has executed for longer than the default timeout period of 15 seconds

here is the part of code:

for (i = 0; i <Count; i++)
                {   
                   
                     var fm:FieldMapping=new FieldMapping();
                    fm.fromField="COL"+ (i+1);
                    fm.toField="Value"+ (i+1);
                    fmArray.push(fm);
                   
                   
                    var g:StockGraph = new StockGraph();
                    g.valueField = fm.toField;
                    g.compareField = fm.toField;
                    g.comparable=true;
                    g.type="smoothedLine";
                    g.setStyle("lineThickness","0.5");
                    g.dataProvider=dataprovider;
                    g.dataSet=ds1;
                    g.dataSet.fieldMappings=fmArray;
                   
                    gArray.push(g);
                   
                }


could you help me out with this issue?

Offline

 

#2 2012-06-26 04:14:25

martynasma
Administrator

Re: Error in generating large amounts of graphs at run time!!

The chart has not physical limit on how many graphs it can display. However it is still limited by the resources of the client computer. For each graph the chart has perform a number operations. When there are too many graphs and too much data it can get to the point where it brings down the machine. You need to accommodate for that.

Besides, from the usability standpoint, I can hardly image how a chart with 100 graphs can be usable to a user.

Offline

 

© amCharts | Forum engine: PunBB