Commit 6a50a2d8 by Your Name Committed by zhaochengxiang

change layout

parent e61dd605
......@@ -93,6 +93,7 @@ function init(container, data) {
// },
'drag-canvas',
'zoom-canvas',
'drag-node'
],
},
defaultNode: {
......@@ -107,10 +108,10 @@ function init(container, data) {
},
layout: {
type: 'dendrogram',
direction: 'LR',
nodeSep: 20,
direction: 'V',
nodeSep: 25,
rankSep: 100,
radial: true,
// radial: true,
},
});
......@@ -171,7 +172,7 @@ G6.registerNode(
draw(cfg, group) {
// console.debug(cfg)
let r = 15, width1 = 0, width2 = 0, lineWidth = 0
let r = 10, width1 = 0, width2 = 0, lineWidth = 0
if (depthCount[cfg.depth] > 10) {
r = 7
}
......@@ -235,9 +236,9 @@ G6.registerNode(
offsetY = lineNum * (fontSize || 12);
let [x, y] = [0, r + refY + offsetY + 5]
if (depthCount[cfg.depth] > 10) {
[x, y] = textXY(root, cfg)
}
// if (depthCount[cfg.depth] > 10) {
// [x, y] = textXY(root, cfg)
// }
group.addShape('text', {
attrs: {
......@@ -465,111 +466,3 @@ function textXY(root, cfg) {
radY * sinAngle + (sinAngle > 0 ? sinAngle * 20 : sinAngle * 10)
];
}
const _data = {
"id": "Modeling Methods",
"children": [
{
"id": "Classification",
"children": [
{
"id": "Logistic regression"
},
{
"id": "Linear discriminant analysis"
},
{
"id": "Rules"
},
{
"id": "Decision trees"
},
{
"id": "Naive Bayes"
},
{
"id": "K nearest neighbor"
},
{
"id": "Probabilistic neural network"
},
{
"id": "Support vector machine"
}
]
},
{
"id": "Consensus",
"children": [
{
"id": "Models diversity",
"children": [
{
"id": "Different initializations"
},
{
"id": "Different parameter choices"
},
{
"id": "Different architectures"
},
{
"id": "Different modeling methods"
},
{
"id": "Different training sets"
},
{
"id": "Different feature sets"
}
]
},
{
"id": "Methods",
"children": [
{
"id": "Classifier selection"
},
{
"id": "Classifier fusion"
}
]
},
{
"id": "Common",
"children": [
{
"id": "Bagging"
},
{
"id": "Boosting"
},
{
"id": "AdaBoost"
}
]
}
]
},
{
"id": "Regression",
"children": [
{
"id": "Multiple linear regression"
},
{
"id": "Partial least squares"
},
{
"id": "Multi-layer feedforward neural network"
},
{
"id": "General regression neural network"
},
{
"id": "Support vector regression"
}
]
}
]
}
\ No newline at end of file
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