OK, I've been using FlashChart for a few years now, and it's great - very reliable, and usefully featured. However, I've just started a new version of the app which uses it, and have immediately run into problems....
First, a spot of background: The web app, written in ASP.NET, collates data (potentially a LOT of data), condenses it into a FlashChart graph, which is saved & then displayed on the resulting web page. This works very well...
...unless there's a lot of data - in which case, the data processing ends up taking so long, the web page times out before it can be displayed...
In order to get around that problem, I've taken the Class which generates the flash chart, added a few nuts & bolts, and I now run it in a separate thread. Thus, the website can remain responsive (the user gets a "working...." note while the report is being built); and the graph is loaded up when it's ready.
This has, however, thrown a couple of new problems:
1) FlashChart thinks it's in demo mode, so I get the "demo version for evaluation purposes only" notice
2) If 2 users simultaneously request graphs, then at least one of those graphs ends up corrupted...
I'm guessing that FlashChart isn't thread-safe? If so, do I need to do a SyncLock on it? And how do I solve the "demo version" problem?
The app works like this:
[website] -> requests: buildGraph.aspx using XHTTPResponse returns: XML data including the path of the new .swf file
buildgraph.aspx -> creates a GraphClass object, which is in a separate DLL
GraphClass -> creates a new object from innerGraphClass, and starts it on a new thread
innerGraphClass gets the data & then calls *another* class to actually build the graph.
Any ideas, anyone?