Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

SAP HANA D3 Library errors - "queue" is not a function

$
0
0

Hello all,

 

i have a question regarding D3 Integration into SAP HANA and hope one can help me.

 

The last days i developed a D3 Choropleth (spatial data) with hover effects, tooltips and a legend. I have an existing SAPUI5 and HANA XS application running and now i wanted to integrate my D3 Choropleth.

 

1 ) First of all, i added the following tags into the head section of the index.html file of my SAPUI5 project as i need those libaries.

 

<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>

<script type="text/javascript" src="http://d3js.org/queue.v1.min.js"></script>

<script type="text/javascript" src="http://d3js.org/topojson.v1.min.js"></script>

 

2) Then, i added the program code of my D3 Choropleth into the view.js of my SAPUI5 project:

 

var html2 = new sap.ui.core.HTML("d3choropleth", {

 

                content: "<div class='D3Choropleth'>" + "</div>",

                preferDOM: false,

                afterRendering: function() {

 

                              .... here is my code ...

 

               }

 

});

 

I have a SAPUI5 shell with different NavigationItems (tabs) and for this D3 Choropleth tab i am writing:

 

case "WI_choropleth":

 

oShell.setContent(html2);

 

break;

 

When i start my SAPUI5 project and klick on the tab where the D3 Choropleth should be rendered, i get the following errors:

 

d3.scale.threshold is not a function

 

d3.geo.albers center is not a function

 

queue is not a function

 

Moreover, i have to say that my D3 Choropleth works standalone outside HANA very well, that is why i assume it is a library integration issue.

In my browsers (firefox) developer console i can see that there is a D3 library loaded by default (as it is one of SAPUI5s components) with the path: sap/ui5/1/resources/sap/ui/thirdparty/D3.js.

 

BUT this is a really old version of D3 (2.9), the current release is D3 (3.4), so maybe the problem is that the D3 libary that is loaded by default overwrites my integration of D3 (script tag above)?

 

Does anyone have the same issues and knows how to solve that? Furthermore it seems that the d3 queue library is also not integrated as the error "queue is not a function" occurs and i also ask me how to solve that error.

 

We have SAP HANA Developer Edition Revision 80 (by AWS), HANA Studio and Client are on revision 73 (64bit).

 

It would be great if anyone could help me with my issue.

 

Further question: Is the current release of D3 going to be integrated into the next HANA revision?

 

Thanks a lot & regards,

 

Andreas


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>