Problems linking data with FusionCharts

I am having problems getting the data to link properly when creating multi-series charts with the FusionCharts wrapper. Here is part of the module domain model, and an example of the output I am getting: As you can see, the issue is that the data points are not linked to the correct date on the x-axis. In the domain model, the x-axis entries (dates) are the GraphDatasetCategory entries, the series (open, closed) are the GraphDataSet entries, and the data values are the GraphSet entries. In the domain model the data values are linked to the correct data series through the GraphDataSet-GraphSet link, but how is the data value supposed to link to the correct date (GraphDatasetCategory)? It looks to me as though there should be an association between GraphSet and GraphDatasetCategory, but the sample charts seem to work without this link. What am I missing?
2 answers

It's hard for me to see what's exactly causing the trouble in this situation, although i can help to guide you to the cause.

There is indeed no directs association between a graphDatasetCategory and a graphDataset. What connects them is that the amount of categories must match the amount of graphsets in the graphDataset.

In the microflow 'ShowXmlGraph' the graph data you composed is converted to a xml structure. To clarify what's happening it might be a good idea to visualize the attribute 'source' of the object 'chartXML' which is created in this microflow.

In example:

the multi serie column screenshot in the app store corresponds with the following xml

<graph xaxisname="Continent" yaxisname="Export">

<categories font="Arial" fontSize="11" fontColor="000000">
 <category name="N. America" hoverText="North America"/>
 <category name="Asia"/>
 <category name="Europe"/>
 <category name="Australia"/>
 <category name="Africa"/>
<dataset seriesname="Rice" color="FDC12E">
 <set value="30"/>
 <set value="26"/>
 <set value="29"/>
 <set value="31"/>
 <set value="34"/>
<dataset seriesname="Wheat" color="56B9F9">
 <set value="67"/>
 <set value="98"/>
 <set value="79"/>
 <set value="73"/>
 <set value="80"/>
<dataset seriesname="Grain" color="C9198D">
 <set value="27"/>
 <set value="25"/>
 <set value="28"/>
 <set value="26"/>
 <set value="10"/>

The issue turned out to be to do with the association between Graph and the other 3 entities. When collecting the data the first step in my workflow was to delete any existing entries linked to the Graph in GraphDatasetCategory, GraphDataSet and GraphSet.

Despite doing this the 'Retrieve list of GraphDataSet by $Graph/Graph_GraphDataSet' action in the ParseGraphDataToXML microflow was still returning the association to the deleted records.

So for example, I might have 2 existing GraphDataSet entries. My microflow deletes these then creates 2 new ones, but the above microflow returns a count of 4 GraphDataSets (2 of which have no values??). The solution was to specifically set the associations to empty after deleting the pre-existing entries.

Seems strange to have to do this to me - I would have thought deleting the entries would have also removed the associations, but perhaps this is a caching issue?