Initial commit [charting]

This commit is contained in:
dfinke
2015-12-18 12:58:42 -05:00
parent 7f67047fa2
commit 652255ca9d
8 changed files with 239 additions and 1 deletions

26
Get-XYRange.ps1 Normal file
View File

@@ -0,0 +1,26 @@
function Get-XYRange {
param($targetData)
$record = $targetData| select -First 1
$p=$record.psobject.Properties.name
$infer = for ($idx = 0; $idx -lt $p.Count; $idx++) {
$name = $p[$idx]
$value = $record.$name
$result=Invoke-AllTests $value -OnlyPassing -FirstOne
[PSCustomObject]@{
Name = $name
Value = $value
DataType = $result.DataType
ExcelColumn = (Get-ExcelColumnName ($idx+1)).ColumnName
}
}
[PSCustomObject]@{
XRange = $infer | ? {$_.datatype -match 'string'} | select -First 1 excelcolumn, name
YRange = $infer | ? {$_.datatype -match 'int|double'} |select -First 1 excelcolumn, name
}
}