#info_table {
width: 100%;
height: 650px;
}
document.addEventListener(“DOMContentLoaded”, function() {
am5.ready(function() {
// Create root element
var root = am5.Root.new(“info_table”);
root._logo.dispose(); //水印
// Set themes
root.setThemes([
am5themes_Animated.new(root)
]);
var container = root.container.children.push(
am5.ZoomableContainer.new(root, {
width: am5.p100,
height: am5.p100,
wheelable: false,// 设置为false以禁用鼠标滚轮缩放
pinchZoom: true// 如果您也想禁用触摸屏的缩放,可以将此设为false
})
);
// Add title
var title = container.contents.children.push(am5.Label.new(root, {
text: “[#63bdc5]八字信息表[/]”,
textAlign: “center”,
x: am5.p50,
y: am5.p50,
centerX: am5.p50,
centerY: am5.p50,
fontSize: 25,
fontWeight: “500”,
fill: am5.color(0x385d63)
}));
var credits = container.children.push(am5.Label.new(root, {
text: “[#63bdc5]图表来源:赛博占卜[/]”,
x: am5.p100,
y: 0,
centerX: am5.p100,
centerY: 0,
fontSize: 15,
fill: am5.color(0x385d63),
cursorOverStyle: “pointer”,
background: am5.Rectangle.new(root, {
fill: am5.color(0x000000),
fillOpacity: 0
})
}));
credits.events.on(“click”, function() {
window.open(“https://saibozhanbu.com/”);
});
// Create series
var series = container.contents.children.push(am5hierarchy.Sunburst.new(root, {
singleBranchOnly: true,
downDepth: 2,
initialDepth: 2,
topDepth: 1,
innerRadius: 100,
valueField: “value”,
categoryField: “name”,
childDataField: “children”
}));
series.nodes.template.setAll({
tooltipText: “{category}”
});
series.slices.template.setAll({
templateField: “nodeSettings”
});
series.labels.template.setAll({
paddingLeft: 10,
paddingRight: 10,
paddingTop: 5,
paddingBottom: 5,
baseRadius: am5.p100,
centerX: am5.p100,
textAlign: “start”
});
// Set data
var data = [
{
name: “COFFEE”,
nodeSettings: { fill: am5.color(0xaaaaaa) },
children: [
{
name: “十二天神”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{
name: “值日”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{ name: “天刑”, nodeSettings: { fill: am5.color(0x993333) }, value: 1 }
]
},
{
name: “值日道”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{ name: “黑道”, nodeSettings: { fill: am5.color(0x993333) }, value: 1 }
]
},
{
name: “值日吉凶”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{ name: “凶”, nodeSettings: { fill: am5.color(0x993333) }, value: 1 }
]
},
{
name: “值时”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{ name: “金匮”, nodeSettings: { fill: am5.color(0x993333) }, value: 1 }
]
},
{
name: “值时道”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{ name: “黄道”, nodeSettings: { fill: am5.color(0x993333) }, value: 1 }
]
},
{
name: “值时吉凶”,
nodeSettings: { fill: am5.color(0x993333) },
children: [
{ name: “吉”, nodeSettings: { fill: am5.color(0x993333) }, value: 1 }
]
}
]
},
{
name: “二十八星宿”,
nodeSettings: { fill: am5.color(0x7c2d45) },
children: [
{
name: “星宿”,
nodeSettings: { fill: am5.color(0x7c2d45) },
children: [
{ name: “室”, nodeSettings: { fill: am5.color(0x7c2d45) }, value: 1 }
]
},
{
name: “动物”,
nodeSettings: { fill: am5.color(0x7c2d45) },
children: [
{ name: “猪”, nodeSettings: { fill: am5.color(0x7c2d45) }, value: 1 }
]
},
{
name: “吉凶”,
nodeSettings: { fill: am5.color(0x7c2d45) },
children: [
{ name: “吉”, nodeSettings: { fill: am5.color(0x7c2d45) }, value: 1 }
]
}
]
},
{
name: “吉神方位”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{
name: “当日喜神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “艮”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “东北”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “时辰喜神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “离”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “正南”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “当日福神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “坎”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “正北”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “时辰福神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “巽”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “东南”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “当日财神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “艮”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “东北”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “时辰财神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “离”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “正南”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “当日阳贵神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “坤”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “西南”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “时辰阳贵神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “震”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “正东”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “当日阴贵神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “艮”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “东北”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
},
{
name: “时辰阴贵神”,
nodeSettings: { fill: am5.color(0x008B8B) },
children: [
{ name: “巽”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 },
{ name: “东南”, nodeSettings: { fill: am5.color(0x008B8B) }, value: 1 }
]
}
]
},
{
name: “胎神”,
nodeSettings: { fill: am5.color(0x009966) },
children: [
{
name: “本日胎神”,
nodeSettings: { fill: am5.color(0x009966) },
children: [
{ name: “占门栖”, nodeSettings: { fill: am5.color(0x009966) }, value: 1 },
{ name: “外西南”, nodeSettings: { fill: am5.color(0x009966) }, value: 1 }
]
},
{
name: “本月胎神”,
nodeSettings: { fill: am5.color(0x009966) },
children: [
{ name: “占灶炉”, nodeSettings: { fill: am5.color(0x009966) }, value: 1 }
]
}
]
},
{
name: “冲煞”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{
name: “日地支冲”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “辰”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “日无情之克”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “戊”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “日有情之克”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “己”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “日地冲生肖”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “龙”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “日煞”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “北”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “时辰地支冲”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “寅”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “时无情之克”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “丙”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “时有情之克”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “丁”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “时地冲生肖”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “虎”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
},
{
name: “时煞”,
nodeSettings: { fill: am5.color(0x4B8B00) },
children: [
{ name: “南”, nodeSettings: { fill: am5.color(0x4B8B00) }, value: 1 }
]
}
]
},
{
name: “节日”,
nodeSettings: { fill: am5.color(0x006400) },
children: [
{
name: “节日”,
nodeSettings: { fill: am5.color(0x006400) },
children: [
{ name: “❌”, nodeSettings: { fill: am5.color(0x006400) }, value: 1 }
]
},
{
name: “传统”,
nodeSettings: { fill: am5.color(0x006400) },
children: [
{ name: “❌”, nodeSettings: { fill: am5.color(0x006400) }, value: 1 }
]
},
{
name: “其它节日”,
nodeSettings: { fill: am5.color(0x006400) },
children: [
{ name: “❌”, nodeSettings: { fill: am5.color(0x006400) }, value: 1 }
]
}
]
},
{
name: “太岁”,
nodeSettings: { fill: am5.color(0x253e4c) },
children: [
{
name: “太岁年”,
nodeSettings: { fill: am5.color(0x253e4c) },
children: [
{ name: “坤”, nodeSettings: { fill: am5.color(0x253e4c) }, value: 1 },
{ name: “西南”, nodeSettings: { fill: am5.color(0x253e4c) }, value: 1 }
]
},
{
name: “太岁月”,
nodeSettings: { fill: am5.color(0x253e4c) },
children: [
{ name: “坤”, nodeSettings: { fill: am5.color(0x253e4c) }, value: 1 },
{ name: “西南”, nodeSettings: { fill: am5.color(0x253e4c) }, value: 1 }
]
},
{
name: “太岁日”,
nodeSettings: { fill: am5.color(0x253e4c) },
children: [
{ name: “坤”, nodeSettings: { fill: am5.color(0x253e4c) }, value: 1 },
{ name: “西南”, nodeSettings: { fill: am5.color(0x253e4c) }, value: 1 }
]
}
]
},
{
name: “节气”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{
name: “当前节”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{ name: “❌”, nodeSettings: { fill: am5.color(0x6666CC) }, value: 1 }
]
},
{
name: “当前气”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{ name: “冬至”, nodeSettings: { fill: am5.color(0x6666CC) }, value: 1 }
]
},
{
name: “上一节气”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{ name: “上一节气令?”, nodeSettings: { fill: am5.color(0x6666CC) }, value: 1 }
]
},
{
name: “下一节气”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{ name: “下一节气令?”, nodeSettings: { fill: am5.color(0x6666CC) }, value: 1 }
]
},
{
name: “三伏”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{ name: “❌”, nodeSettings: { fill: am5.color(0x6666CC) }, value: 1 }
]
},
{
name: “数九”,
nodeSettings: { fill: am5.color(0x6666CC) },
children: [
{ name: “一九”, nodeSettings: { fill: am5.color(0x6666CC) }, value: 1 }
]
}
]
},
{
name: “其它”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{
name: “四宫”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “北”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
},
{
name: “六曜”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “友引”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
},
{
name: “七政”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “火”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
},
{
name: “十二值星”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “开”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
},
{
name: “星座”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “♐️ 射手”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
},
{
name: “儒略日”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “2453361.125”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
},
{
name: “月相”,
nodeSettings: { fill: am5.color(0xCC66CC) },
children: [
{ name: “宵”, nodeSettings: { fill: am5.color(0xCC66CC) }, value: 1 }
]
}
]
},
{
name: “九星”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{
name: “九数”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “三”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “七色”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “碧”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “五行”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “木”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “方位”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “震”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “方位描述”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “正东”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “北斗”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “天玑”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “玄空”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “禄存”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “玄空吉凶”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “凶”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “太乙九神”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “轩辕”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “太乙类型”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “安神”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “太乙歌诀”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “出入会轩辕,凡事必缠牵,相生全不美,相克更忧煎,远行多不利,博彩尽输钱,九天玄女法,句句不虚言。”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “奇门”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “天冲”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “奇门八门”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “伤”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “奇门吉凶”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “小吉”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “奇门阴阳”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “阳”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
},
{
name: “序号”,
nodeSettings: { fill: am5.color(0x72588a) },
children: [
{ name: “2”, nodeSettings: { fill: am5.color(0x72588a) }, value: 1 }
]
}
]
}
]
}
];
series.data.setAll(data);
series.set(“selectedDataItem”, series.dataItems[0]);
// Make stuff animate on load
series.appear(1000, 100);
}); // end am5.ready()
});