Commit f47b089a by Your Name

change layout

parent 193c344b
...@@ -93,6 +93,7 @@ function init(container, data) { ...@@ -93,6 +93,7 @@ function init(container, data) {
// }, // },
'drag-canvas', 'drag-canvas',
'zoom-canvas', 'zoom-canvas',
'drag-node'
], ],
}, },
defaultNode: { defaultNode: {
...@@ -107,10 +108,10 @@ function init(container, data) { ...@@ -107,10 +108,10 @@ function init(container, data) {
}, },
layout: { layout: {
type: 'dendrogram', type: 'dendrogram',
direction: 'LR', direction: 'V',
nodeSep: 20, nodeSep: 25,
rankSep: 100, rankSep: 100,
radial: true, // radial: true,
}, },
}); });
...@@ -171,7 +172,7 @@ G6.registerNode( ...@@ -171,7 +172,7 @@ G6.registerNode(
draw(cfg, group) { draw(cfg, group) {
// console.debug(cfg) // 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) { if (depthCount[cfg.depth] > 10) {
r = 7 r = 7
} }
...@@ -235,9 +236,9 @@ G6.registerNode( ...@@ -235,9 +236,9 @@ G6.registerNode(
offsetY = lineNum * (fontSize || 12); offsetY = lineNum * (fontSize || 12);
let [x, y] = [0, r + refY + offsetY + 5] let [x, y] = [0, r + refY + offsetY + 5]
if (depthCount[cfg.depth] > 10) { // if (depthCount[cfg.depth] > 10) {
[x, y] = textXY(root, cfg) // [x, y] = textXY(root, cfg)
} // }
group.addShape('text', { group.addShape('text', {
attrs: { attrs: {
...@@ -465,111 +466,3 @@ function textXY(root, cfg) { ...@@ -465,111 +466,3 @@ function textXY(root, cfg) {
radY * sinAngle + (sinAngle > 0 ? sinAngle * 20 : sinAngle * 10) 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