Chart the grid's grouped/pivoted aggregates with ApexCharts. getChartModel() turns the current view into series; renderChart(container) draws it. Here: salary sum & average per department.
getChartModel()
renderChart(container)