Код: Выделить всё
function preview() {
/*centerElement();*/
let fileNameWithTitle = MyTitle.replace(/\s+/g, '_');
let PdfTitle = "" + MyTitle + "";
OrgChart.pdfPrevUI.show(chart, {
format: 'A4',
landscape: true,
padding: 50,
header: PdfTitle,
filename: fileNameWithTitle += "_OrgChart.pdf"
});
}
Код: Выделить всё
Division Organization Chart
Если вам интересно, как я нацеливаюсь на заголовок id boc,
Код: Выделить всё
@import url("https://fonts.googleapis.com/css?family=Gochi+Hand");
.node {
font-family: Arial;
}
boc-header {
color: rgb(117, 117, 117) !important;
position: absolute !important;
left: 50% !important;
top: 15px !important;
transform: translateX(-50%) !important;
}
.node.HR rect {
fill: #E99113;
}
.node.HR line {
stroke: #E99113;
}
chart.on('exportstart', function (sender, args) {
args.styles += document.getElementById('myStyles').outerHTML;
});
Спасибо.
Все подробности указаны выше
Подробнее здесь: https://stackoverflow.com/questions/786 ... orgchartjs
Мобильная версия