Commit 0e775d1b authored by Romain Loth's avatar Romain Loth

various fixes: servermenu, serverfile, json parse step

parent 77dd4d0a
......@@ -16,6 +16,19 @@
}
}
},
"data/comexjsons": {
"first" : "graph_example.json",
"gexfs": {
"graph_example.json": {},
"graph_example_attrs.json": {}
}
},
"data/test": {
"first" : "test_with_various_atts.gexf",
"gexfs": {
"test_with_various_atts.gexf": {}
}
},
"data/AXA": {
"dbname":"data.db",
"title":"ISITITLE",
......@@ -35,7 +48,6 @@
"social": { "table":"ISIAUTHOR" , "textCol":"data","forkeyCol":"id"},
"semantic": { "table":"ISItermsAxa_2015" , "textCol":"data","forkeyCol":"id"}
}
}
},
"data/ClimateChange": {
......
......@@ -84,7 +84,7 @@ function changeGraphAppearanceByFacets( manualflag ) {
color_menu_info += `<li><a href="#" onclick='clusterColoring("clust_louvain")'>By Louvain clustering (${TW.partialGraph.graph.nNodes()})</a></li>`
// for debug
console.warn('color_menu_info', color_menu_info)
// console.warn('color_menu_info', color_menu_info)
$("#colorgraph-menu").html(color_menu_info)
}
......
......@@ -67,9 +67,9 @@ TW.conf = (function(TW){
// attribute | coloring | number | binning
// title | function | of bins | mode
// --------------------------------------------------------------------
'age' : {'col': "gradient", 'n': 2, 'binmode': 'samerange'},
'growth_rate' : {'col': "heatmap", 'n': 11, 'binmode': 'samepop' },
'PageRank' : {'col': "gradient", 'n': 8, 'binmode': 'samepop' },
'age' : {'col': "gradient", 'n': 4, 'binmode': 'samerange'},
'growth_rate' : {'col': "heatmap", 'n': 5, 'binmode': 'samepop' },
'PageRank' : {'col': "gradient", 'n': 4, 'binmode': 'samerange' },
'numuniform' : {'col': "heatmap", 'n': 7, 'binmode': 'samepop' },
'numpareto' : {'col': "gradient", 'n': 5, 'binmode': 'samerange'},
'intfewvalues' : {'col': "cluster" , 'n': 4, 'binmode': 'samerange'},
......
......@@ -162,7 +162,7 @@ function SelectionEngine() {
var tMS2_deb = performance.now()
console.log("IN SelectionEngine.MultipleSelection2:")
console.log("nodes", args.nodes)
console.log("args", args)
}
greyEverything();
......@@ -243,7 +243,7 @@ function SelectionEngine() {
}
}
// FIXME: could be done in previous loop
// separate loop to allow nodes_2_colour without nodes as args (only used in changeType)
for(var nid in nodes_2_colour) {
if(nid) {
n = TW.partialGraph.graph.nodes(nid)
......
......@@ -167,10 +167,7 @@ function createFilechooserEl () {
TW.instance.clearSigma()
// run
if (theFormat == 'json')
mainStartGraph(theFormat, JSON.parse(rdr.result), TW.instance)
else
mainStartGraph(theFormat, rdr.result, TW.instance)
mainStartGraph(theFormat, rdr.result, TW.instance)
writeLabel(`Local file: ${clientLocalGraphFile.name}`)
}
......@@ -1083,7 +1080,8 @@ function jsActionOnGexfSelector(gexfBasename){
if (pathcomponents[i] != 'explorerjs.html')
serverPrefix += '/'+pathcomponents[i]
}
var newDataRes = AjaxSync({ URL: window.location.origin+serverPrefix+gexfPath });
var newDataRes = AjaxSync({ "url": window.location.origin+serverPrefix+gexfPath });
// remove any previous instance
TW.instance.clearSigma()
......
......@@ -268,12 +268,14 @@ function syncRemoteGraphData () {
if (TW.conf.debug.logFetchers)
console.log("\t\t\t"+gexfBasename+ " -> table:" +theGexfs[aGexf]["semantic"]["table"] )
console.log("\t\t\t"+gexfBasename)
// -------------------------->8------------------------------------------
// £TODO this part is underspecified
// if used in some usecases, port it to nodetypes
// otherwise remove
// console.log("\t\t\ttable:"+theGexfs[aGexf]["semantic"]["table"])
// TW.field[path+"/"+aGexf] = theGexfs[aGexf]["semantic"]["table"]
// ex : data/AXA/RiskV2PageRank5000.gexf:"ISItermsAxa_2015"
// -------------------------->8------------------------------------------
......
......@@ -9,7 +9,7 @@ var ParseCustom = function ( format , data ) {
this.data = $.parseXML(data)
}
else {
this.data = data
this.data = JSON.parse(data)
}
this.format = format;
this.nbCats = 0;
......@@ -486,7 +486,7 @@ function facetsBinning (valuesIdx) {
// FIXME why still NaN sometimes ?
// NB: however skipping them is enough for work
else if (isNaN(val)) {
console.debug('skipped undetected NaN ? attribute, lastCursor, k, sortedDistinctVals[k], nodes:', at, lastCursor, k, val, valuesIdx[cat][at].map[sortedDistinctVals[k]])
// console.debug('skipped undetected NaN ? attribute, lastCursor, k, sortedDistinctVals[k], nodes:', at, lastCursor, k, val, valuesIdx[cat][at].map[sortedDistinctVals[k]])
continue
}
......@@ -1081,6 +1081,7 @@ function scanJSON( data ) {
// Level-00
// for {1,2}partite graphs
function dictfyJSON( data , categories ) {
if (TW.conf.debug.logParsers)
console.log("ParseCustom json 2nd loop, main data extraction, with categories", categories)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment