Chart XML data

Using Chart Tools (Chart Data XY) with Data Structure from XML Importer

lukee's picture

I'm just evaluating Chart Tools.

I want to do a simple line plot of a single value for about 60 items (actually these are minutes in the hour). I have an XML that has elements "min00", "min01" etc. containing the single value for each.

This XML comes through as a structure value that looks like: 0:"min00" = 11 1:"min01" = 12 2:"min02" = 13 ... etc for 60 minutes

Now, what I'm finding is that this structure (which appears to have NSCFString types for the values - presumably normal for the XML Importer output) won't actually work when presented to Chart Data XY's "Data Structure" input. I get a plot of all zeros (though if I turn on value or key data labels then I can see each zero has its 'min' label or the associated value).

If I write a little Javascript to copy array values over to a new structure (essentially a new Javascript Array object), then the values are plotted correctly (though at the moment, I'm losing the keys as these are replaced by the simple index of the Javascript Array).

So, I'm wondering if there's some limitation of Chart Data XY's expectations with respect to the structure it can use (connected to the "Data Structure" input). Specifically, whether the string values from the XML Importer output are all resulting in the zero values for the data series.

Would somebody be kind enough to indicate whether its possible to get the unchanged output from the XML Importer to work (preferably so I can plot proper keys as well as data values).

Also, I can't find any documentation to suggest exactly what structure formats the Chart Data XY patch supports. Clearly, an array of numbers generated by the Javascript patch works fine. Maybe I can modify my Javascript patch to convert the output from the XML Importer to preserve the keys, but have numeric values... assuming that the string values are the only reason this is not working out-of-the-box.

Anyway, any clues greatly appreciated!

-- Luke