Everything else: -Options¶
-Options takes any Apache ECharts option and is merged
over what the parameters generated: objects key by key, arrays element by element (series[0] changes
the first series), an object given for an array (yAxis = @{...}) applies to every element.
The full Apache ECharts option, merged over what the parameters built.
$months = 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun' | ForEach-Object -Begin { $i = 0 } -Process { $i++; [pscustomobject]@{ Month = $_; Tickets = 300 + 20 * $i; SLA = 96 + $i / 2 } }
New-UDEChart -Data $months -Type bar -X Month -Y Tickets, SLA -SecondaryY SLA -SecondaryTitle 'SLA %' -Height 320px -Options @{
series = @(@{ itemStyle = @{ borderRadius = 6 } }, @{ type = 'line'; smooth = $true })
}
The ECharts instance is reachable in the browser as
document.getElementById('<id>').querySelector('div').echarts.
-Options is configuration for the app author; do not build it from what a user typed
(Security and limits). Which gallery example needs which parameter or option:
Apache ECharts gallery.