The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Dear Community,
I have built a Visual in D3 as normal javascript file and I want to use it as a custom visual in PowerBI. You find all the project data here. The Repository is divided in the javascript visual and the PowerBI Visual.
The goal is (this is the D3 viz) to have a chart with dates on each axis. On the x-axis is the "report-date", on the left y axis is the "vor_ende". On the right y axis is again the "report_date" for a diagonal line through the chart. The lines are grouped by a milestone.
The problem I faced is that the data cennection in PowerBi isn't that easy as in normal D3. I tried to get the same datastructure like I used in the D3 viz by adding an index to the data and use this indes as "Grouping" in the capabilities file. The other columns are declared as "Measure" in capabilities. By this I was able to get the Data into the model and with the nest() function to group by the milestones for a similar datastructure like in the D3 Visual.
By adding axis to the PowerBI visual the problem is now that the axes dont have ticks and lines could not be drawn in the Visual. I think the problem is in the way I connected the data into the model.
Looks pretty empty, hm?
Does anybody see my mistake(s) and is able to help me? Here again the files i used.
Greetings 🙂
Solved! Go to Solution.
Hi @Anonymous,
Did you mean you use d3.js custom visual with your own script to achieve the custom visual graph? If that is the case, this script should refer to the d3.js visual usage and limitations. If you are stuck with connection external data sources, I'd like to suggest you use another data connector to get data to power bi first, then you can simply interact with these existing data model tables.
Reference link:
Power BI D3.js Visual (jppp.org)
BTW, power bi service also limited some visual and script operations(due to performance and security reasons) and direct access to the external resources, you can check the below link to know more about these.
Power BI Security - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi @Anonymous,
Did you mean you use d3.js custom visual with your own script to achieve the custom visual graph? If that is the case, this script should refer to the d3.js visual usage and limitations. If you are stuck with connection external data sources, I'd like to suggest you use another data connector to get data to power bi first, then you can simply interact with these existing data model tables.
Reference link:
Power BI D3.js Visual (jppp.org)
BTW, power bi service also limited some visual and script operations(due to performance and security reasons) and direct access to the external resources, you can check the below link to know more about these.
Power BI Security - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng