cancel
Showing results for 
Search instead for 
Did you mean: 
iburiak
Sisense Team Member
Sisense Team Member

Funnel chart migration from Funnel Add-on to out-of-the-box widget

Previously, we had the Funnel widget as a separate solution, which became a part of the product and is no longer supported as a plugin. (https://www.sisense.com/marketplace/funnel-widget/)

After updating to a version higher than 2023.5, you can observe the issue with the Funnel plugin. 

You can run the following scripts in the application database to automatically change the widgets from the plugin to the widget. 

 

var cursor = db.widgets.find({ "subtype": "funnel" });

cursor.forEach(function(doc) {

   db.widgets.update(

      { "_id": doc._id },

      {

         $set: {

            "subtype": "chart/funnel"

         }

      }

   );

});




var cursor = db.widgets.find({ "type": "funnel" });

cursor.forEach(function(doc) {

   db.widgets.update(

      { "_id": doc._id },

      {

         $set: {

            "type": "chart/funnel"

         }

      }

   );

});





db.widgets.find({ "metadata.panels.name": "Category" }).forEach(function(doc) {

   var updatedPanels = doc.metadata.panels.map(function(panel) {

      if (panel.name === "Category") {

         return { "name": "categories", "items": panel.items };

      } else {

         return panel;

      }

   });




   db.widgets.update(

      { "_id": doc._id },

      { $set: { "metadata.panels": updatedPanels } }

   );

});

After running these scripts in the application database all your Funnel charts will be changed from the plugin to the widget. 

Rate this article:
Version history
Last update:
‎09-08-2023 09:41 AM
Updated by:
Contributors