Display Unassigned as a category

Hi team,

Wonderful tool !!! I’m building some Dashboards and I’m facing an issue with unassigned tasks.

One of these dashboards is a chart of tasks categorized by asignee. The problem is that all unassigned tasks are in this chart as well (they are displayed which is good) but not displayed in the legend.

Would there be a kind of way to display these Unassigned tasks as a category with a legend in addition to my assignee ?

Ex :
Assignee 1 : Task1, Task2
Assignee 2 : Task3
Unassigned : Task4, Task5

In addition my chart is filtering a list. I managed to get correct filter when not assigned but wouldn’t want to break all :slight_smile:

Here’s my code at the moment :

[code]var handlers = {};
handlers.preRender = function (config, logger) {
logger.debug('Configuration: ', config);

var filtrationApplied = false;

config.plotAreaClick = function (e) {
if (!filtrationApplied) {
window.location.hash = ‘’;
}

    filtrationApplied = false;
}

config.seriesClick = function (e) {
    if (ctx && ctx.clvp) {       
        var filter =
          'FilterField1=Owner-FilterValue1=' + e.dataItem.value;

/Clear the value to filter the list in case the value is “undefined”/
if(String(e.dataItem.value).indexOf(“u”)!=-1)
{
e.dataItem.value=’’;
}

        window.location.hash = 'InplviewHash' +
        ctx.clvp.wpid + '=' + encodeURIComponent(filter);
        filtrationApplied = true;
    }
}
return true;

}[/code]

Hi,
Could you drop a template of the source list with data (List settings -> Save this list as template) and chart’s configuration (Export it in Dashboard Designer) to support@spchart.com?

Hi Dimitry,

Thanks for your answer, just sent you the files :slight_smile:

Hi,
Please, use this code in Dashboard -> Advanced:

[code]var handlers = {};
handlers.preRender = function (config, logger) {
logger.debug('Configuration: ', config);

var filtrationApplied = false;
config.series[0].data[0].value = "Unassigned";
config.plotAreaClick = function (e) {
    if (!filtrationApplied) {
        window.location.hash = '';
    }

    filtrationApplied = false;
}

config.seriesClick = function (e) {
    if (ctx && ctx.clvp) {
        var filter =
            'FilterField1=Owner-FilterValue1=' +
            ((e.dataItem.value == "Unassigned") ? '' : e.dataItem.value);

        window.location.hash = 'InplviewHash' +
            ctx.clvp.wpid + '=' + encodeURIComponent(filter);

        filtrationApplied = true;
    }
}
return true;

}[/code]

Works perfectly Thanks a lot !