Simple plugin to alter widget


1 comment

  • Avatar
    Avi Tavdi

    Hi Garrett,

    Plugin is the recommended approach in your case.

    I suggest you add a menu item to the widget so you can toggle the functionality. You can add menu item using "beforemenu" event, for example: prism.on("beforemenu",function(ev, args){//code here}). The event is fired whenever menu is opened. you can add new items and also check which menu was opened (

    Jump to dashboard adds menu item to the widget menu (search "beforemenu" in the files), take a look at it as reference.

    More advance option will be adding a toggle button to the right design panel of a widget. Here you can find a plugin that adds controllers to the design panel.


    If you are trying to apply custom sort there are few things to consider:

    1. You can use "queryend" event and sort the raw results returning from the server
    2. Another alternative when using charts is "beforeviewloaded" event, which holds the options object which eventually passed to highcharts to be rendered.
    3. Try to use one of the above options instead of "processresult"
    4. The pivot is rendered on the server side= and there is html returned to the web application, in addition the results are paginated which makes it harder to apply custom sort.
    5. Any custom logic executed on the results returned wont be reflected in CSV and Excel export (PDF should be find). That requires more advance implementation involves server side extension.


    Hope the info is helpful let me know if you have further questions


    Comment actions Permalink

Please sign in to leave a comment.