Jump to content
Software FX Community

Can I pass a hashtable to out-chart?


marco.shaw

Recommended Posts

Something simple like:

$a=@{canada="1,2,3"}

Even after running get-member to determine the name of the properties, this won't work:
$a|out-chart -label keys -values values

Actually, I'm wanting to do something like this, and am wondering if it might actually work somehow:

$a|out-chart -label keys -values $a["canada"].split(',')[0],$a["canada"].split(',')[1],$a["canada"].split(',')[2]

If not, I'll have to set off in a different direction...

Link to comment
Share on other sites

We do not have any code in PowerGadgets that would allow you to retrieve data from a hashtable. this sounds interesting for future builds but I see at least the following options

- If there is 1 value per key, use the keys as labels and plot the values- If there are arrays as values, we could treat each key/array as a series or each value in the array as a different series.- Should we also handle if there are complex objects in the hash?

At this point, if you need the hash because you need to "consolidate" values, you will have to loop through your hash and create objects and then pass an array/list of these objects to out-chart.

JuanC

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...