Dropbown to adjust Date Aggregation Unit



I’m building workload tracking graph with Dashboard Designer and am using several dropdown to adjust my graph.

I got two of them (Project group and timeframe selectors, in green in the screenshot) working properly, using

if (processor && !processor.subscribed) {
processor.subscribed = true;

in handlers.finish on the datasource side to capture the dropdown action and rebuilding the query.

I also managed to programatically change the Date Aggregation Unit setting config.categoryAxis.baseUnit in handlers.preRender but would it be possible to add it to a kind of handlers.finish to the Dashboard side to get the same “refresh” behavior that on the dataside ?


Dear Tonio,
It is possible to change base unit with JavaScript. First, add these two lines to preRender before return true:

window.$ = $;

First line will make JQuery available on the page, second will allow you to get ID of the chart you want to change. Then you can bind code like this to change event of the dropdown and change base unit dynamically:

  categoryAxis: {
    baseUnit: 'days'

You’ll obviously need to customize it, so it can read value from the dropdown and change baseUnit to an appropriate one, but this should work. Tell us if you’ll experience any trouble, we’ll try to find a way to resolve it.