Hi,
I'd like to create a custom Power BI Visual using the PBIVIZ api tooling by Microsoft. develop-power-bi-visuals
Following is my attempt at modifying the standard solution and adding the ej2-gantt control per the following code extract and attached solution.
I can get data to show per the following screenshot. However, I can't get any styling or interactivity to come through. I think it is due to the sand-boxed environment that PowerBI uses which does not allow syncfusion Javascript to run.
Do you have any examples where syncfusion controls have been used to create a PowerBI custom visual, or do you have any hints on what I can try on my example?
I have been continuing to investigate this issue and it seems to be related to the loading of the stylesheet for the control.
If I add the following code to the visual.less file, the style sheet will be included with the webpack process and will be available in the rendered output.
@import (less) '../../[solution name]/node_modules/@syncfusion/ej2-gantt/styles/material.css' ;
However when I inspect the styles for the rendered html element, it does not recognise the imported style sheet.
I experimented with adding the link to the style sheet via cdn in the header of the custom visual, and I did find a couple times that the visual did render correctly. However, unfortunately I did not save the solution and I can't seem to reproduce it now - but at least it seems that it is possible to do.
Has anyone been able to shed any light on this problem?
Hi Greg,
We apologize for any inconvenience this may have caused. We are checking the reported problem by preparing sample with PowerBI and we will share information about the sample within two days, on or before Feb 15-2024.
Regards,
Ajithkumar G
Thanks, that would be appreciated. It would be great if we can get this to work.
Hi Greg,
We suspect
that the issue may cause some dependent themes related to Gantt Chart has not
been referred properly. So we suggest to refer the below documentation link
Individual component reference: https://ej2.syncfusion.com/angular/documentation/gantt/getting-started#adding-css-reference
Or else use below https://ej2.syncfusion.com/documentation/gantt/getting-started#import-the-syncfusion-css-styles (Refer whole theme)
CDN reference: https://ej2.syncfusion.com/angular/documentation/appearance/overview#cdn-direct-referral
Power BI
document: https://support.syncfusion.com/kb/article/9464/how-to-integrate-datepicker-into-power-bi-application-in-javascript#creating-ccustom-vvisual
After
following above reference still faced issue, share us the details like
CSS reference file, Screenshot to validate further.
Regards,
Ajithkumar G
Thanks very much for this response - it is exactly what I needed. This is the first time I've tried to use the javascript / typescript controls and I didn't realise that I had to import so many css modules for the gantt chart. Once I imported the full list shown in your getting started reference into the visual.less file, the visual rendered correctly.
Thanks also for the link to the knowledge base. I actually looked for something like that article and didn't find it, so thanks for sending the link.
I note that there are 4 or 5 errors in the article so that it doesn't actually work straight from the screen, but I was able to get it going by making a few changes. I suspect that the pbiviz interfaces might have changed since the article was written. It might be helpful if Syncfusion reviewed and updated the kb article (I'd be happy to have a first go if you send me a link to the md file).
Hi Greg,
We will modify the KB as per suggestion and we will let you know once kb refreshed. Until then we appreciate your patience.
Regards,
Ajithkumar G