#图表数据结构问题反馈
BarPlot_A 及 BarPlot_CelltypeProportion 文件夹下的 所有json文件的数据格式有小问题
字段value缺少 左边引号如下图:
若数据格式如此:{"name":'test11',"value":233},则 name和value为 key
而现在给到的数据key 很多都缺少双引号 拿PiePlot/Adult/IAS.json举例
拿给的示例文件中PiePlot/Adult/Atrium.json举例
格式基本都存在第一点json格式问题,第二点问题部分存在,下面的数据示例,已做出相应调整,为可用数据,可进行对比校正,或参照生成。
name为饼图各项的名称
value值为饼图数据值 可以为0-1之间的小数值
[
{
"name": "Colon", //名称
"value": 10 // 数据值(数值任意 可以为0-1的小数值)
},
{
"name": "Duodenum", //名称
"value": 10 // 数据值
},
{
"name": "Intestine",
"value": 10
},
{
"name": "Pancreas",
"value": 10
},
{
"name": "Prostate",
"value": 10
},
{
"name": "Vessel",
"value": 10
}
]
[
{
"name":"Endothelial", // 柱形图x轴的名称
"value":"0.213", // 名称对应的值
"upper":"0.247", // 误差上界值
"lower":"0.179" // 误差下界值
},{
"name":"Cardiomyocyte",
"value":"0.353",
"upper":"0.379",
"lower":"0.327"
},{
"name":"Myelocyte",
"value":"0.0508",
"upper":"0.0599",
"lower":"0.0418"
}
]
可根据接口请求提供的数据,进行渲染,数据格式如下
与eca项目中Gene Portraits数据格式一致
以上图最后一个数据 Vessel 为例 x_max 为最大刻度,大写 X 开头的为数据值,_row 为名称,nz_median 为均值,nz_ratio 为比例
[{
"mean": 1.7374,
"nz_ratio": 0.5812, // 比例
"nz_mean": 2.9892,
"nz_median": 2.995, // 均值
"x_max": 4.847, // 山脊图的最大数据值
"_row": "Vessel", // 名称
"X1": 0, // 数据值
"X2": 0, // 数据值
"X3": 0,
"X4": 0,
"X5": 0,
"X6": 1.3664e-17,
"X7": 3.5592e-17,
"X8": 8.2029e-17,
"X9": 1.3393e-16,
"X10": 1.3065e-16,
"X11": 1.2481e-16,
"X12": 8.0031e-17,
"X13": 2.4151e-17,
"X14": 3.8689e-17,
"X15": 9.2642e-17,
"X16": 1.0731e-16,
"X17": 3.1001e-17,
"X18": 9.6731e-17,
"X19": 1.3775e-16,
"X20": 1.1657e-16,
"X21": 1.0429e-16,
"X22": 0,
"X23": 5.0473e-19,
"X24": 3.477e-17,
"X25": 0,
"X26": 0,
"X27": 0,
"X28": 0,
"X29": 0,
"X30": 1.7531e-17,
"X31": 4.1719e-18,
"X32": 3.2235e-20,
"X33": 1.1333e-17,
"X34": 1.7152e-17,
"X35": 0,
"X36": 0,
"X37": 0,
"X38": 7.6132e-21,
"X39": 0,
"X40": 0,
"X41": 0,
"X42": 2.8349e-17,
"X43": 9.109e-16,
"X44": 9.9252e-14,
"X45": 9.6421e-12,
"X46": 5.1852e-10,
"X47": 1.5729e-8,
"X48": 3.5517e-7,
"X49": 4.7124e-6,
"X50": 0,
"X51": 0.0002,
"X52": 0.0007,
"X53": 0.0016,
"X54": 0.0025,
"X55": 0.0031,
"X56": 0.0041,
"X57": 0.0069,
"X58": 0.0122,
"X59": 0.0195,
"X60": 0.0277,
"X61": 0.0366,
"X62": 0.0477,
"X63": 0.0625,
"X64": 0.0795,
"X65": 0.0976,
"X66": 0.12,
"X67": 0.1505,
"X68": 0.1897,
"X69": 0.233,
"X70": 0.2759,
"X71": 0.322,
"X72": 0.3803,
"X73": 0.4518,
"X74": 0.5296,
"X75": 0.6092,
"X76": 0.6909,
"X77": 0.7734,
"X78": 0.8506,
"X79": 0.9168,
"X80": 0.9675,
"X81": 0.9954,
"X82": 0.9988,
"X83": 0.9828,
"X84": 0.9458,
"X85": 0.8851,
"X86": 0.8126,
"X87": 0.7445,
"X88": 0.6795,
"X89": 0.6082,
"X90": 0.53,
"X91": 0.4497,
"X92": 0.3689,
"X93": 0.2905,
"X94": 0.2215,
"X95": 0.1664,
"X96": 0.1244,
"X97": 0.0921,
"X98": 0.0664,
"X99": 0.0452,
"X100": 0.0285,
"X101": 0.017,
"X102": 0.0101,
"X103": 0.006,
"X104": 0.0033,
"X105": 0.0014,
"X106": 0.0004,
"X107": 0.0001,
"X108": 0,
"X109": 9.155e-7,
"X110": 4.8555e-8,
"X111": 1.7601e-9,
"X112": 3.6488e-11,
"X113": 5.0284e-13,
"X114": 4.8643e-15,
"X115": 0,
"X116": 0,
"X117": 1.1607e-17,
"X118": 7.481e-18,
"X119": 0,
"X120": 1.4283e-17,
"X121": 1.1703e-17,
"X122": 9.303e-18,
"X123": 0,
"X124": 0,
"X125": 0,
"X126": 0,
"X127": 0,
"X128": 0
}]
[
{
"source": "北京", //来源节点
"target": "天津", //目标节点
"value": 30 //来源节点与目标节点之间的边的权重值
},
{ "source": "北京", "target": "上海", "value": 80 },
{ "source": "北京", "target": "河北", "value": 46 },
{ "source": "北京", "target": "辽宁", "value": 49 },
{ "source": "北京", "target": "黑龙江", "value": 69 },
{ "source": "北京", "target": "吉林", "value": 19 },
{ "source": "天津", "target": "河北", "value": 62 },
{ "source": "天津", "target": "辽宁", "value": 82 },
{ "source": "天津", "target": "上海", "value": 16 },
{ "source": "上海", "target": "黑龙江", "value": 16 },
{ "source": "河北", "target": "黑龙江", "value": 76 },
{ "source": "河北", "target": "内蒙古", "value": 24 },
{ "source": "内蒙古", "target": "北京", "value": 32 }
]
xAxis 中的数组为x轴名称
yAxis 中的数组为y轴名称
data中的数组为[x轴名称, y轴名称, 数值]
{
"xAxis" : ["LA", "IAS", "RA", "LV", "IVS", "RV"],
"yAxis": [
"GOMF_ODORANT_BINDING22",
"GOMF_OLFACTORY_RECEPTOR_ACTIVITY",
"GOMF_RNA_BINDING_INVOLVED_IN_POSTTRANSCRIPTIONAL_GENE_SILENCING",
"GOBP_SENSORY_PERCEPTION_OF_SMELL",
"GOBP_SENSORY_PERCEPTION_OF_CHEMICAL_STIMULUS",
"GOBP_NEGATIVE_REGULATION_OF_LIPOPOLYSACCHARIDE_MEDIATED_SIGNALING_PATHWAY",
"GOBP_DETECTION_OF_CHEMICAL_STIMULUS",
"GOCC_T_CELL_RECEPTOR_COMPLEX",
"GOBP_T_HELPER_2_CELL_CYTOKINE_PRODUCTION",
"GOMF_BITTER_TASTE_RECEPTOR_ACTIVITY"],
"data": [
["IAS", "HP_DECREASED_SPECIFIC_ANTIBODY_RESPONSE_TO_VACCINATION", "0.736780233450102"],
["RA", "HP_DECREASED_SPECIFIC_ANTIBODY_RESPONSE_TO_VACCINATION", "0.302038601748377"],
["LV", "HP_DECREASED_SPECIFIC_ANTIBODY_RESPONSE_TO_VACCINATION", "-0.397629031412998"],
["IVS", "HP_DECREASED_SPECIFIC_ANTIBODY_RESPONSE_TO_VACCINATION", "-0.457828602707893"],
["RV", "HP_DECREASED_SPECIFIC_ANTIBODY_RESPONSE_TO_VACCINATION", "-0.262354097168022" ],
["LA", "HP_HEMOPHAGOCYTOSIS", "-0.274508509130648"],
["IAS", "HP_HEMOPHAGOCYTOSIS", "0.702724793111926"],
["RA", "HP_HEMOPHAGOCYTOSIS", "0.29182637549406"],
["LV", "HP_HEMOPHAGOCYTOSIS", "-0.333706814884265"],
["IVS", "HP_HEMOPHAGOCYTOSIS", "-0.358264191654831"],
["RV", "HP_HEMOPHAGOCYTOSIS", "-0.498378143878785"],
["LA", "GOBP_CD8_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION", "-0.214690195646867"],
["IAS","GOBP_CD8_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION","0.677677554596456"],
["RA", "GOBP_CD8_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION", "0.247435675459855"],
["LV", "GOBP_CD8_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION", "-0.445171496084532"],
["IVS", "GOBP_CD8_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION", "-0.360486628492458"],
["RV", "GOBP_CD8_POSITIVE_ALPHA_BETA_T_CELL_DIFFERENTIATION", "-0.368575967707071"],
["LA", "HP_ABNORMAL_PROPORTION_OF_CD8_POSITIVE_T_CELLS", "-0.465445766485901"],
["IAS", "HP_ABNORMAL_PROPORTION_OF_CD8_POSITIVE_T_CELLS", "0.660757220846809"],
["RA", "HP_ABNORMAL_PROPORTION_OF_CD8_POSITIVE_T_CELLS", "0.255149666869973"],
["LV", "HP_ABNORMAL_PROPORTION_OF_CD8_POSITIVE_T_CELLS", "-0.140673804426962"],
["IVS", "HP_ABNORMAL_PROPORTION_OF_CD8_POSITIVE_T_CELLS", "-0.199409073620709"],
["RV", "HP_ABNORMAL_PROPORTION_OF_CD8_POSITIVE_T_CELLS", "-0.467942248610119"],
["LA", "GOBP_PROTEIN_MONO_ADP_RIBOSYLATION", "-0.455059195232591"],
["IAS", "GOBP_PROTEIN_MONO_ADP_RIBOSYLATION", "0.655183980727934"],
["RA", "GOBP_PROTEIN_MONO_ADP_RIBOSYLATION", "-0.364044273019618"],
["LV", "GOBP_PROTEIN_MONO_ADP_RIBOSYLATION", "-0.395238028707588"],
["IVS", "GOBP_PROTEIN_MONO_ADP_RIBOSYLATION", "0.248963904409363"],
["RV", "GOBP_PROTEIN_MONO_ADP_RIBOSYLATION", "-0.232900377628356"],
["LA", "GOBP_REGULATION_OF_AUTOPHAGOSOME_MATURATION", "-0.583193992730511"],
["IAS", "GOBP_REGULATION_OF_AUTOPHAGOSOME_MATURATION", "0.652798117606066"],
["RA", "GOBP_REGULATION_OF_AUTOPHAGOSOME_MATURATION", "-0.377689937638048"],
["LV", "GOBP_REGULATION_OF_AUTOPHAGOSOME_MATURATION", "-0.398479087290148"],
["IVS", "GOBP_REGULATION_OF_AUTOPHAGOSOME_MATURATION", "0.48205224922469"],
["RV", "GOBP_REGULATION_OF_AUTOPHAGOSOME_MATURATION", "-0.177832188871199"],
["LA", "GOMF_DYNACTIN_BINDING", "-0.502244042868854"],
["IAS", "GOMF_DYNACTIN_BINDING", "0.650775014376306"],
["RA", "GOMF_DYNACTIN_BINDING", "-0.248509451911961"],
["LV", "GOMF_DYNACTIN_BINDING", "-0.225404063625008"],
["IVS", "GOMF_DYNACTIN_BINDING", "0.136731447799814"],
["RV", "GOMF_DYNACTIN_BINDING", "-0.122461953824922"],
["LA", "HP_MOOD_SWINGS", "-0.549846206622921"],
["IAS", "HP_MOOD_SWINGS", "0.649777046487264"],
["RA", "HP_MOOD_SWINGS", "-0.52324178127632"],
["LV", "HP_MOOD_SWINGS", "-0.393016562892692"],
["IVS", "HP_MOOD_SWINGS", "0.552279560696581"],
["RV", "HP_MOOD_SWINGS", "-0.0434841616904236"],
["LA", "GOCC_H3_HISTONE_ACETYLTRANSFERASE_COMPLEX", "-0.546114727791016"],
["IAS", "GOCC_H3_HISTONE_ACETYLTRANSFERASE_COMPLEX", "0.646000185142596"],
["RA", "GOCC_H3_HISTONE_ACETYLTRANSFERASE_COMPLEX", "-0.36923076770796"],
["LV", "GOCC_H3_HISTONE_ACETYLTRANSFERASE_COMPLEX", "-0.334950885052449"],
["IVS", "GOCC_H3_HISTONE_ACETYLTRANSFERASE_COMPLEX", "0.352557331144976"],
["RV", "GOCC_H3_HISTONE_ACETYLTRANSFERASE_COMPLEX", "0.061392637988599"],
["LA", "GOBP_ALPHA_LINOLENIC_ACID_METABOLIC_PROCESS", "-0.643634915049963"],
["IAS", "GOBP_ALPHA_LINOLENIC_ACID_METABOLIC_PROCESS", "0.637977747486616"],
["RA", "GOBP_ALPHA_LINOLENIC_ACID_METABOLIC_PROCESS", "0.00753816908644278"],
["LV", "GOBP_ALPHA_LINOLENIC_ACID_METABOLIC_PROCESS", "-0.469358011850293"],
["IVS", "GOBP_ALPHA_LINOLENIC_ACID_METABOLIC_PROCESS", "0.32193709595321"],
["RV", "GOBP_ALPHA_LINOLENIC_ACID_METABOLIC_PROCESS", "-0.181862447899972"]
]
}
json为{名称:[[x1, y1], [x2, y2],...],...}
{
"cell1":[[6.2655,-10.5708],[7.3906,-10.4232],[3.8781,-8.3344],[5.2468,-7.2163],[7.2397,-7.4244],[7.0077,-8.8247],[4.5787,-7.8053],[6.3204,-6.5326],[4.9836,-9.3453],[3.4431,-9.2747],[4.9618,-10.7092],[6.6312,-8.4462],[6.3424,-10.5805],[7.5336,-10.0571],[5.9012,-7.6853],[6.6091,-8.7748],[7.395,-9.2263],[2.0944,-8.4397],[5.0365,-10.4935],[7.3363,-8.1591],[6.9674,-9.5724],[3.6407,-9.8051],[6.6677,-9.7831],[3.2052,-9.1198],[3.3904,-9.9366],[6.1766,-8.903],[6.4012,-9.56],[5.4599,-10.659],[3.5629,-9.3783],[6.1302,-10.9668],[3.9235,-9.7435],[3.6106,-8.4058],[7.3706,-7.3784],[4.1465,-9.8886],[6.4591,-10.1347],[6.8655,-10.3227],[5.0691,-10.0103],[4.9511,-9.642],[6.3771,-10.7883],[6.8869,-10.044],[7.5378,-9.1029],[6.1928,-9.3076],[5.5762,-10.3884],[5.8842,-9.493],[7.0948,-10.311],[5.2314,-10.0665],[5.4677,-7.6927],[6.579,-8.6504],[6.8125,-7.1951],[3.5273,-8.5816],[7.7707,-8.4478],[5.1004,-7.3456],[5.9292,-7.4744],[4.776,-9.7946],[5.2687,-9.115],[5.7576,-8.8124],[6.5754,-10.5597],[6.8125,-8.2062],[5.8963,-10.4394],[4.802,-7.4329],[5.6474,-10.6088],[5.4508,-9.394],[7.3249,-9.1465],[6.8025,-8.021],[6.7311,-8.959],[7.5151,-8.0786],[6.2507,-8.1165],[3.7059,-9.6565],[6.5236,-10.2837],[7.4536,-8.7886],[6.7604,-7.2219],[6.2974,-9.2452],[4.9399,-8.0786],[4.7006,-10.4333],[5.5335,-7.6705],[6.9068,-7.4556],[5.1837,-9.645],[7.2882,-9.1159],[6.2486,-8.7034],[6.7309,-8.7983],[6.6283,-9.9695],[6.231,-9.1761],[7.4407,-9.9573],[6.3886,-8.1112],[7.2803,-7.4653],[6.2971,-10.8246],[6.0557,-11.0576],[5.9321,-10.0066],[4.6883,-10.4259],[4.6815,-7.321],[5.5534,-10.5868],[6.7075,-10.1204],[4.6259,-9.7272],[4.9494,-7.5762],[4.2749,-9.654],[3.2962,-9.18],[3.8863,-10.0305],[6.1005,-7.8111],[6.051,-10.5023],[7.0649,-7.4247],[4.9158,-10.5641],[5.292,-10.6767],[5.3636,-10.2909],[3.7885,-8.237],[6.3263,-10.2211],[6.1371,-9.477],[5.8074,-9.9376],[5.0732,-8.6892],[4.5824,-10.7646],[4.5101,-8.2259],[5.4642,-7.4636],[5.9874,-8.5154],[3.8085,-9.4636],[3.855,-7.5574],[6.5859,-9.7863],[4.6171,-9.0275],[6.0019,-10.2127],[6.6682,-10.1817],[3.7336,-9.9297],[7.2765,-10.3363],[4.3093,-8.5586],[3.3062,-9.3501],[4.4581,-8.9693],[6.0069,-10.9213],[7.4254,-8.0779],[5.9576,-7.0917],[3.3566,-9.6575],[5.1553,-10.1327],[5.2695,-8.1115],[4.7619,-8.1223],[4.1007,-9.4867],[5.83,-10.6576],[5.7155,-10.849],[5.4823,-10.2976],[7.085,-10.106],[5.102,-10.5284],[5.1456,-10.8464],[4.5351,-8.4935],[5.1719,-10.0439],[6.3209,-10.7675],[4.5331,-7.322],[4.0042,-10.3845],[3.6314,-9.265],[6.3087,-9.7368],[6.087,-9.3947],[6.1386,-10.914],[5.906,-8.1926],[5.6141,-9.9344],[4.8979,-10.6974],[4.7816,-8.9256],[3.5899,-9.753],[4.2272,-7.7003],[4.5163,-10.2666],[5.6649,-10.5441],[6.2058,-10.2935]],
"cell2": [[7.8914,-8.5059],[6.297,-6.4995],[3.4765,-9.4355],[6.8077,-10.2465],[5.9229,-10.8594],[4.929,-10.4513],[7.187,-7.7484],[6.4192,-6.6461],[6.3714,-8.2203],[6.7359,-9.5627],[3.5041,-8.9228],[6.3106,-10.6984],[7.8142,-8.3378],[6.0493,-8.0563],[6.0964,-9.8847],[6.0241,-7.4422],[6.5855,-6.1745],[6.8166,-10.0266],[5.3099,-7.8085],[5.4605,-7.2947],[7.0455,-9.5605],[7.0263,-7.84],[7.4648,-10.2857],[6.0529,-11.1181],[6.7816,-9.8859],[7.7566,-8.9595],[6.9782,-10.6841],[3.4173,-9.8955],[3.734,-9.7289],[4.7382,-9.7184],[6.6218,-10.9191],[7.1413,-10.0366],[4.5625,-7.9641],[4.2762,-9.9219],[4.4361,-7.276],[3.7441,-8.9314],[6.2875,-6.9696],[7.2464,-7.9758],[5.7525,-7.5097],[7.5045,-9.6704],[5.9371,-10.3716],[5.2389,-7.2467],[4.3795,-7.3497],[6.3119,-9.9223],[6.2108,-6.7384],[4.9606,-7.8294],[4.7188,-7.2783],[5.3719,-10.244],[5.3034,-7.6462],[4.7951,-10.521],[6.3455,-11.1377],[6.2332,-10.9041],[6.5924,-7.8583],[4.4378,-10.4812],[4.771,-10.629],[5.6732,-8.0655],[5.2137,-8.8737],[6.7739,-9.4876],[7.2911,-10.5848],[5.9155,-10.8848],[7.2921,-9.3293],[7.082,-10.077],[5.5371,-10.4954],[5.9201,-10.372],[4.7691,-10.273],[7.57,-8.4806],[5.3514,-9.3732],[6.4973,-8.3492],[5.3301,-10.2382],[7.2503,-10.289],[4.1222,-9.8262],[7.5529,-7.7624],[6.2696,-10.0631]]
}
nodes为节点数组:id唯一 category可设置成 类目数组categories的下标或者名称
links为节点连线数组:source为源节点id,target为目标节点id,value为边的数值可线性映射到边的长度。
categories为类目数组:name为类目名称
{
"nodes": [ // 节点数组对象
{
"id": "0", // 节点对应的id
"name": "Myriel", // 节点名称
"symbolSize": 19.12381, //节点原型尺寸大小 (若不提供则由前端设置)
"value": 28.685715, // 节点值
"category": 0 // 类目数组下标
},
{
"id": "1",
"name": "Napoleon",
"symbolSize": 2.6666666666666665,
"value": 4,
"category": 0
},
{
"id": "2",
"name": "MlleBaptistine",
"symbolSize": 6.323809333333333,
"value": 9.485714,
"category": 1
},
{
"id": "3",
"name": "MmeMagloire",
"symbolSize": 6.323809333333333,
"value": 9.485714,
"category": 2
}
],
"links": [ // 连线数组对象
{
"source": "1", // 源节点id
"target": "0", // 目标节点id
// value为边的数值,不同大小的值会线性映射到不同的长度。值越小则连线长度越长,距离越远
// 不同边的数值差异越明显,则连线的长度差异越大
"value": "30"
},
{
"source": "2",
"target": "0",
"value": "15"
},
{
"source": "3",
"target": "0",
"value": "1"
}
],
"categories": [ // 类目数组对象
{
"name": "cell1" // 类目名称
},
{
"name": "cell2"
},
{
"name": "cell3"
}
]
}