AKSW / cubeviz.ontowiki

OntoWiki component to visualize RDF-DataCubes
Other
34 stars 7 forks source link

TypeError: this.chartConfig.series[0] is undefined Main-production.js:1 #195

Open dcherix opened 9 years ago

dcherix commented 9 years ago

With the dataset: https://raw.githubusercontent.com/GeoKnow/GeoQuality/didier/GeoKnow-SpatialDQ/datacubes/unister/unister_urn%3Aunister-hotel-reviews1-6.ttl Part of Dataset selected: InstanceCount Component Specification of Class: Hotel and Person are selected I have the following issue:

TypeError: this.chartConfig.series[0] is undefined Main-production.js:1
TypeError: a.renderTo is undefined
Stack trace:
tb.prototype.destroy@http://localhost/cubeviz/extensions/cubeviz/public/javascript/libraries/highcharts.js:198:132
View_IndexAction_Visualization</a.prototype.render@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:157153
View_IndexAction_Visualization</a.prototype.onReRender_visualization@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:155751
f</<.proxy/g@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:2:12944
f.event.dispatch@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:3:4760
f.event.add/i@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:3:660
f.event.trigger@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:3:3417
.trigger/<@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:3:11090
f</<.each@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:2:11771
f</e.prototype.each@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:2:8295
.trigger@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:3:11062
CubeViz_View_Application</CubeViz_View_Application.prototype.triggerEvent@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:6629
CubeViz_View_Abstract</a.prototype.triggerGlobalEvent@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:4511
View_DataselectionModule_Component</a.prototype.onClick_closeAndUpdate/<@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:113087
View_DataselectionModule_Component</a.prototype.readAndSaveSetupComponentDialogChanges/</<@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:117631
a/<@http://localhost/cubeviz/extensions/cubeviz/public/javascript/Main-production.js:1:46252
f.Callbacks/o@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:2:14725
f.Callbacks/p.fireWith@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:2:15497
w@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:4:12491
.send/d@http://localhost/cubeviz/extensions/themes/silverblue/scripts/libraries/jquery.js:4:18315
 Main-production.js:1
k00ni commented 9 years ago

Hi @dcherix,

i was able to reproduce your error and will look into it next week, hopefully at Monday (working part time on CubeViz).

There are DataCube Vocabulary provides over 20 check constraints, which are ASK SPARQL queries to validate the cube. Maybe you could find the time to check your cube, if its valid?

It seems all the data are available, but CV could not connect selected dimensions with observations to display.

k00ni commented 9 years ago

No explicit declaration of dimension elements

I think the problem is, that your cube lacks a connection between the dimension http://www.geoknow.eu/properties/Class and their related dimension elements. Sure, your observations have the right properties, for instance

<http://www.geoknow.eu/data-cube/metric/averageSurface/obs/3>
    ...
    <http://www.geoknow.eu/properties/Class>
         <http://purl.org/acco/ns#Hotel> ;
    ....

but there is no explicit definition of the dimension elements themselves in the cube. CubeViz itself outputs the following information, after i select all dimension elements of that Class-dimension:

cv-dev-info

As you can see, there are no key-value-pairs concerning dimension/dimension elements. Usually you have keys representing selected dimensions and values representing the according dimension elements. These dimension element may exist in the cube, but if there are no dimension elements defined, CubeViz will not recognize them later on, when building the frontend visualization.

Activate development mode in CubeViz

You can active the development mode in CubeViz to see such information like in the screenshot above using console of your browser (F12 in Chrome e.g.) by replacing the following line in the doap.n3 file of CubeViz:

:context "production"^^xsd:string ;

with that one:

:context "development"^^xsd:string ;

Alternative cube for testing purpose

I created a small potion of the Scoreboard 2012 of the European Union that you can use in your CubeViz installation: https://gist.github.com/k00ni/8a18447c04d48d5cc7c1

It should produce an output like this:

scoreboard-potion

You should use this cube to get an idea of how a cube might look like. Furthermore, please consider to use more meaningful URIs for cube elements such as dimensions (e.g. add dim into the URI to indicate that its a dimension). It was really hard to see what elements you use in your cube.

dcherix commented 9 years ago

I have added the dimension definition to the file, but it's not working.

k00ni commented 9 years ago

Could you please provide the updated version of your datacube? Furthermore, did you got any more information about the integrity of your datacube by executing these check constraints?

I ran into many problems creating datacubes, when i started working on this topic in 2012. So, i know how frustrating it could be. My suggestion is that you start from scratch with 1 observation, 1 dsd, 1 ds, 1 measure, 1 dimension and 1 dimension element. If you got that, try it with CubeViz. Keep in mind, that RDF is case-sensitive.

Please let me know, if when you get new results.

dcherix commented 9 years ago

I have updated the cube in github so you can download it under https://raw.githubusercontent.com/GeoKnow/GeoQuality/didier/GeoKnow-SpatialDQ/datacubes/unister/unister_urn%3Aunister-hotel-reviews1-6.ttl

It's still not possible to visualize the cube with the provided vm.

dcherix commented 9 years ago

This cube https://github.com/GeoKnow/GeoQuality/blob/master/GeoKnow-SpatialDQ/datacubes/NUTS/NUTS-metric1-6.ttl is not visualizable too. If you select the averageSurface part oft the dataset you run in the same problem if you use the provided vm. With an other installation of cubeviz (laptop from Saleem) it's possible to visualize this cube.

k00ni commented 9 years ago

What commit of CubeViz is Saleem running?