Suppose we want to use D3 JS library data visualization ability and use it inside SAP UI5 application , (already using VIZ library which is based on D3 in sap.m but want to have more elements and more capabilities to represent data )
- Is it possible and advisable ?
- If yes ,then are there any other framework based on D3 library which can be utilized to do the integration as SAP UI5 is a object oriented framework and writing D3 code inside the view is not working ?
Find below the failed trial of integration , where execution of standalone D3 code was successful :
createContent : function(oController) {
var canvas = d3.select("idPage01")
.append("svg")
.attr("width",4000)
.attr("height",2000)
.attr("length",100);
canvas.append("circle")
.attr("cx", 200)
.attr("cy",200)
.attr("r",10);
var lv_Page = new sap.m.Page("idPage01",{
title: "VIZ",
content: [
canvas
]
});
return lv_Page;
}
The error it is shown in console is :
Uncaught TypeError: Cannot read property 'render' of undefined