Line chart hover

Basic chart with line and bar to demonstrate (nicked from UD docs):

New-UdChart -Title "Virtual Memory Size" -Type Bar -Endpoint {
    				Get-Process | Get-Random -Count 10 |  Out-UDChartData -LabelProperty "Name" -Dataset @(
    					$ds1 = New-UdChartDataset -DataProperty "VirtualMemorySize" -Label "Size" -BackgroundColor "Green" -HoverBackgroundColor "Yellow" 
    					$ds1.type = 'bar'
    					$ds2 = New-UdChartDataset -DataProperty "PeakVirtualMemorySize" -Label "Free Space" -BackgroundColor "Blue" -HoverBackgroundColor "Yellow"
    					$ds2.type = 'line'
    					$ds1
    					$ds2
    				)
    			}

Hover changes the colour of the bar but does nothing to the line. If hover only effects the data point selected, that makes sense. But I’d like to hover on a single line in a multi-line chart to effectively highlight it (like event viewer can).
Have I missed something or am I looking for a feature that isn’t available?

gav

Hello @OpsEng aka Gav. Dude have you tried this in a bar chart as the whole bar changes colour…? Think that is the behaviour you are looking for I do not really use line charts as most of my end-users prefer bigger the better sort of charts…Let us know can post some code if required.

I’ve got several charts of historical usage, e.g. memory. I’ll have a dig around chart.js and see if I can come up with something.

I might have to bug you about UD integration. You seem to be making great inroads!

Gav

1 Like