var argumentAxis = DashboardDataAxisNames.ChartArgumentAxis,
    seriesAxis = DashboardDataAxisNames.ChartSeriesAxis;

function setColors(args) {
    //var chartClientData = webViewer.GetItemData("chartDashboardItem1"),
    //    pieClientData = webViewer.GetItemData("pieDashboardItem1"),
    //    GridClientData = webViewer.GetItemData("gridDashboardItem3");

    //var currentElement = args.GetTargetElement();


    //var chartClientData = dbv1.GetItemData("chartDashboardItem1"),
    //    pieClientData = dbv1.GetItemData("pieDashboardItem1"),
    //    gridClientData = dbv1.GetItemData("gridDashboardItem1");

    //var currentElement = args.GetTargetElement();

    //if (args.ItemName == "chartDashboardItem1") {
    //    var country = currentElement.GetAxisPoint(DashboardDataAxisNames.ChartSeriesAxis).GetValue();
    //    var value = chartClientData.GetSlice(currentElement.GetAxisPoint(argumentAxis)).
    //                                GetSlice(currentElement.GetAxisPoint(seriesAxis)).
    //                                GetMeasureValue(chartClientData.GetMeasures()[0].Id).GetValue();
    //    if (country == "UK" && value > 50000 || country == "USA" && value > 100000)
    //        args.SetColor("#33CC66");
    //    else
    //        args.SetColor("#CC6633");
    //}

    //if (args.ItemName == "pieDashboardItem1") {
    //    var value = pieClientData.GetSlice(currentElement.GetAxisPoint(argumentAxis)).
    //                              GetMeasureValue(pieClientData.GetMeasures()[0].Id).GetValue();
    //    if (value < 100000)
    //        args.SetColor("#FFCC66");
    //}



    //if (args.ItemName == "gridDashboardItem1") {
    //    var value = gridClientData.GetSlice(currentElement.GetAxisPoint(argumentAxis)).
    //                              GetMeasureValue(gridClientData.GetMeasures()[0].Id).GetValue();
    //    //if (value < 100000)
    //    args.SetColor("#FFCC66");
    //}

    //if (args.ItemName == "chartDashboardItem1") {
    //    var country = currentElement.GetAxisPoint(DashboardDataAxisNames.ChartSeriesAxis).GetValue();
    //    var value = chartClientData.GetSlice(currentElement.GetAxisPoint(argumentAxis)).
    //                                GetSlice(currentElement.GetAxisPoint(seriesAxis)).
    //                                GetMeasureValue(chartClientData.GetMeasures()[0].Id).GetValue();
    //    if (country == "UK" && value > 50000 || country == "USA" && value > 100000)
    //        args.SetColor("#33CC66");
    //    else
    //        args.SetColor("#CC6633");
    //}

    //if (args.ItemName == "pieDashboardItem1") {
    //    var value = pieClientData.GetSlice(currentElement.GetAxisPoint(argumentAxis)).
    //                              GetMeasureValue(pieClientData.GetMeasures()[1].Id).GetValue();
    //    if (value < 10)
    //        args.SetColor("#FFCC66");
    //}
    //if (args.ItemName == "gridDashboardItem3") {
    //    //var country = currentElement.GetAxisPoint(DashboardDataAxisNames.ChartSeriesAxis).GetValue();
    //    var value = GridClientData.GetSlice(currentElement.GetAxisPoint(argumentAxis)).
    //                                GetSlice(currentElement.GetAxisPoint(seriesAxis)).
    //                                GetMeasureValue(chartClientData.GetMeasures()[0].Id).GetValue();
    //    if (value > 10 || value > 100)
    //        args.SetColor("#33CC66");
    //    else
    //        args.SetColor("#CC6633");
    //}

};