Comments (7)
I think i found my problem. To fix it i have to use the selfDestruct() function. When i try to call this function right after the Send of the cubes i got the following error: What could this mean?
Error from Engine: Object {jsonrpc: "2.0", id: 2, error: Object}
error: Object
code: 9
message: "Empty parameters"
parameter: "Empty ID"
TypeError: queue is not a function
from senseutils.
Hi Peter, there is probably a step in your code somewhere where you are duplicating the calls to create the filterPanel. If you check out the traffic in the example (http://sense.axisgroup.com/extensions/filterpanel/filterpanel.html), you'll see that it doesn't duplicate calls as you filter.
The only way I can help you here is if you share some of your code. Is there anyway you can post a gist or jsFiddle?
Thanks
Speros
from senseutils.
Hi Speros,
The code i have is more than 1000 lines long, is there an alternative? I would like to try it first by trying to selfDestruct the multicube (the multicube has 55 cubes by looping)
for (var i = 0; i < ratioFormules.length; i++) {
cube[i] = {
qDimensions: [
{
qDef: {
qFieldDefs: ["Jaar"]
},
"qNullSuppression": true,
}],
qMeasures: [
{
qDef: {
qDef: ratioFormules[i],
qLabel: ratioFormules[i]
},
"qNullSuppression": true
}
],
qInitialDataFetch: [{
qHeight: 20,
qWidth: 2
}]
};
}
var myCube = senseUtils.multiCube()
.app(app) // set the app
.callback(viz) // set the callback
for (var i = 0; i < cube.length; i++) {
myCube.addCube(cube[i]); // create the cubes by looping
}
selfDestruct doesn't work i keep getting this error:
Error from Engine: Object {jsonrpc: "2.0", id: 2, error: Object}
error: Object
code: 9
message: "Empty parameters"
parameter: "Empty ID"
TypeError: queue is not a function
I have looked into the senseUtils.js file to find out why it isn't finding the "qId" and when i do console log on the "d" parameter in the selfDestruct function
multiCube.selfDestruct = function() {
cubes.forEach(function(d) {
console.log(d);
senseUtils.destroyObj(app, d.qId);
});
app = null, cubes = [], callback = function() {
}, queue = null;
}
it gives me this log:
Object {id: "b0e47ff7-b6cc-76dc-6cd2-4eef62a2c353", def: Object, status: 0, data: null, qId: null}
>data: Object
>def: Object
>id: "b0e47ff7-b6cc-76dc-6cd2-4eef62a2c353"
>qId: "MU6"
>status: 1
The strange thing is that in that object the qId is filled in but if you see the main line it says qId: null
I think it has something to do with this function in the senseUtils file where you are explicitly telling the new object that qId = null
cubes.push({
id : id,
def : _,
status : 0,
data : null,
qId : null
});
Thanks Peter
from senseutils.
Sorry for the push but i need to get it working on wednesday. I looked at the code in senseUtils.js again and there is really something strange with this "qId" property that gives me null.
from senseutils.
Hi Peter, I need you to help me help you :)
I understand you have a lot of code, but perhaps you could trim down to just an example snippet where you are calling the filterPanel methods? Then I could help diagnose the problem.
Based on your previous description:
"or this app i use jQuery and building all my html code inside the callback of the hypercube."
Your problem may be that you are building the filterPanel inside the callback of the hypercube. This would result in the filterPanel being rebuilt each time a selection is made, causing problems. The filterPanel only needs to be created once, outside of any callbacks that would be initiated multiple times.
Take a look at the example here: http://sense.axisgroup.com/extensions/filterpanel/filterpanel.html
The source code is available here: http://sense.axisgroup.com/extensions/filterpanel/filter-panel-ex.js
from senseutils.
Hi,
Well i hope you can make something out of my code, but this is the javascript code i have made (in JSFiddle. I am working with highcharts now, it could change in the future to D3 charts. sorry if it is alot but if i strip down the code then maybe you could not see in total what i am building. In total i have 1 basic cube and 2 times an amount of multicubes. In the first multicube i do a loop so the cubes that are build there are dynamical to the amount of formules in my array i have from the default cube.
If there are some thing you dont understand please let me know.
JSFIDDLE: https://jsfiddle.net/7zrekj9e/
Peter
from senseutils.
One of my problems is solved, regarding the selfDestruct function. I found out you have to do this in the callback. Now i am facing another problem, When i do a selfDestruct and i filter with one of the filterPanel fields, my hypercubes i Destruct earlier stay empty, is this normal behaviour?
from senseutils.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from senseutils.