Hi,
I followed this demo example.
var handlers = {};
handlers.preRender = function (config, logger) {
logger.debug('Configuration: ', config);
config.title.font = "21pt Segoe UI";
var filtrationApplied = false;
config.plotAreaClick = function (e) {
if (!filtrationApplied) {
window.location.hash = '';
}
filtrationApplied = false;
}
config.seriesClick = function (e) {
if (ctx && ctx.clvp) {
var filter =
'FilterField1=Supervisor-FilterValue1=' + e.dataItem.__proto__.Supervisor;
window.location.hash = 'InplviewHash' +
ctx.clvp.wpid + '=' + encodeURIComponent(filter);
filtrationApplied = true;
}
}
return true;
}
Did get a CORS error:
Putting this direct in browser;
https://SomeTenant.sharepoint.com/sites/StartCardsandSWMS/#InplviewHashc8fbf2b6-dc36-4a91-b6b0-2e77a5224bfd=FilterField1=Supervisor-FilterValue1=Li%20Chen
Loads with these errors:
OnClick is working.
As a work around I’m using href and opening a full filtered list. Code below works fine.
However, I’d like to stay on the dashboard.
var handlers = {};
handlers.preRender = function (config, logger) {
logger.debug('Configuration: ', config);
config.title.font = "21pt Segoe UI";
config.seriesClick = function (e){ window.location.href =
'https://SomeTenant.sharepoint.com/sites/StartCardsandSWMS/Lists/Start%20Card%20%20General%20Survey/AllItems.aspx?useFiltersInViewXml=1&FilterField1=Supervisor&FilterValue1='
+ e.dataItem.__proto__.Supervisor + '&FilterType1=User&viewid=c8fbf2b6-dc36-4a91-b6b0-2e77a5224bfd'}
return true;
}
I'd like to confirm, before I spend too much time looking into it, is linking a chart to a view possible in O365 modern experience? Chart and List View are both modern webparts. Multiple charts on the page, only a single list view webpart. Seems the server says no?