Want to open a drill down chart once a person clicks on the bar

I am using Helical Insight 3.0 version and I have created a grouped bar chart with one measure and two dimensions i.e. the chart is showing country wise product wise sales.
Now I want to open a drill down chart once a person clicks on the bar. The problem is when clicked on drill down I want to pass product rather than country but the drill down script is not giving me that option only.
How can I achieve something like this?

1 Like

Hello Anu,

We will provide additional options with the drill down scripts in the future. However, as of now the drill down script only shows the first dimension and applies drill down on that first dimension only. In your case since your chart is having 2 dimensions that’s why you are having this problem.

Via below code, it is possible to specify on which dimension we would like to have drill down.

There is no need to use UI driven drill down script if we are using the below code.

Please put the below code in the “JS Editor” section of “Editor” of the grouped bar chart. Kindly replace the actual URL of the drill down child report, which should open when clicked, in the windows.open. Also at &Type replace “Type” with the actual name of the filter.

hi_container.set("preExecution",function(c){
var viz_Options = c.get("viz_Options");
viz_Options.chartOptions.data = {
onclick: function(d,i) {
console.log(d.name);
reportRender({type:d.name});
}
};
c.set("viz_Options",viz_Options);
});


function reportRender(filters) {
window.open("http://192.168.2.51:8081/hi-ee/hi.html?dir=1556529637242&file=fb313e5e-3371-4cad-827e-8127383ad6ae.report&mode=dashboard&Type="+filters.type,"_blank");
}

Thank You
Helical Team.