AnsweredAssumed Answered

How can I extend/change aikau BarChart onitemclick value?

Question asked by alaksmana on Nov 20, 2017

Currently BarChart extends Chart. And its onitemclick is:


onItemClick: function(scene){

               this.alfPublish(this.clickTopic, scene.atoms.category.rawValue);



However, I need the BarChart to return a different value other than that "category". Therefore I made another link in the array upon loading readers. 


               readers: [

                                { names: "category", indexes: 0 },

                                { names: "link", indexes: 1 },

                                { names: "value", indexes: 2 }


I managed to display the right value in the tooltip: 

tooltip += "<strong>" + Alfresco.util.encodeHTML( + "</strong><br/>";


However, when I override the function onItemClick, the graph simply wont display. 


onItemClick: function dms_widgets_BarChart__onItemClick(value){



         if (value) 


            var newvalue = {

                 atoms: {

                      category: {





           this.inherited(arguments, newvalue);









What other way can I do to make it so that onitemclick will go to "link" value instead of the display value "category"?