We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Dashboard Viewer

Hi Guys,

I have multiple Dashboards that I want to embed into my Asp.Net MVC 5 application , the main dashboard will have a link to another dashboard in another controller,

I want to use one tab when I open dashboards, I don't want multiple tabs to open for each dashboard.

Is this possible to do I want it to work like a SPA one tab for all dashboards that I open

Thanks

Edmund Herbert 

5 Replies

NR Nigin Raj E.C Syncfusion Team August 18, 2017 12:57 PM UTC

Hi Edmund, 
I have multiple Dashboards that I want to embed into my Asp.Net MVC 5 application , the main dashboard will have a link to another dashboard in another controller, 
You can make use of the URL linking feature. Please refer the documentation on URL linking  
To learn more about the customization of filter to be passed to the child dashboard please refer our documentation  
To make the filterParameters API listen to the URL query please bind the location.search string to the filterParameters API of Dashboard Viewer 
I want to use one tab when I open dashboards, I don't want multiple tabs to open for each dashboard. 
Is this possible to do I want it to work like a SPA one tab for all dashboards that I open 
Yes, you can hide the tabs of Multi tabbed dashboards using the API showTab. Please refer the documentation on how to hide the tabs https://help.syncfusion.com/dashboard-platform/dashboard-sdk/how-to/hide-the-dashboard-tabs-and-render-a-single-tab  
You can also specify the tab that you need to render by specifying the index of the tab, or its name by using the API’s selectedTabIndex and selectedTabName. Please find the API documentation https://help.syncfusion.com/dashboard-platform/dashboard-sdk/ejdashboardviewer#members:selectedtabindex  
Eg: 
$("#container").ejDashboardViewer({ 
dashboardPath:”D:/dashboard/sample.sydx”, 
serviceUrl:”http://domain.com/dashboardservice.svc” 
 selectedTabIndex:0 
 }); 
 
 
 
Regards, 
Nigin Raj E C 



ED Edmund August 18, 2017 01:49 PM UTC

Hi I tried your solution no luck I am attaching my app please see what I am doing wrong


Thanks

Edmund Herbert


Attachment: Test_53dd7c43.zip


BN Bharath Natarajan Syncfusion Team August 21, 2017 11:23 AM UTC

Hi Edmund, 

Thanks for your update, 
We have checked with your attachment and found that the view of the secondary/ target dashboard linked which doesn’t have filterParameters 
So we have included the filterParameters: API on the target dashboard as below : 

filterParameters: window.location.search.replace("?",'') 
 
Also we have the option to include the parameter from which the linked dashboard get filtered. 
It should be done while configuring the linking in designer itself. 

 

?ColumnName = {{:ColumnName}}  along with the dashboard URL is the format to set parameters for filtering. 

And regarding hiding tabs on the dashboard, it could applicable only for multi tabbed dashboards. 
In your project, you have used to hide tabs with the single tabbed dashboard with selectedTabIndex : 0 
The following showTab API is set to be as false for hiding tab in a dashboard.  

$('#dashboard').ejDashboardViewer( 
        { 
            serviceUrl: '@ViewBag.ServiceUrl.ToString()', 
            dashboardPath: '@ViewBag.dashboardPath', 
            showTab: false, 
            selectedTabIndex: 3, 
            filterParameters: window.location.search.replace("?",'') 
        }); 

In the project we have included the Northwind Trader Sales Analysis dashboard in a multi tabbed dashboard. 
And which takes the position 4 (index 3) as shown below: 

 

By configuring the linking on the primary dashboard Northwind Product Suppliers Dashboard on the Grid widget with the parameter above, and clicking on Grid rows will open up the linked dashboard (Sales dashboard) with other tabs hidden. 
Along with the product name selected on the Grid widget in primary dashboard. 

 

Please find the modified project as below: 

And kindly let us know if you need further assistance on this. 

Regards, 
Bharath N 



EH Edmund Herbert August 22, 2017 06:57 AM UTC

Hi Bharath,

I have not explained properly to you what my issue is I apologize and will try and explain in detail, my application when running uses multiple dashboards which are called from different controllers each time I call a new dashboard a new window tab is opened I want only one window tab to open we got confused with tabs in dashboard, I am refering to window tabs.

I hope this makes it more clear

Thanks

Edmund Herbert



BN Bharath Natarajan Syncfusion Team August 23, 2017 09:42 AM UTC

Hi Edmund, 

Thanks for your update. 
Yes, please find the modified sample below: 

In the sample we are using an iframe to render the dashboards from different controller views. At the top of the page there are tabs, based on the tab selection the iframe will be re rendered with the dashboard. 
At the moment you cannot customize the behavior of links being opened from the dashboard, we are currently working on this feature and it will be available in our upcoming release which is expected in September. For now all the links will be opened up in the new tab. 
 
Please let us know if you need further assistance on this. 

Regards, 
Bharath N 


Loader.
Up arrow icon