Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/apexcharts/src/modules/ drwxrwxr-x | |
| Viewing file: Select action/file-type: import Graphics from './Graphics'
export default class TitleSubtitle {
constructor(ctx) {
this.ctx = ctx
this.w = ctx.w
}
draw() {
this.drawTitleSubtitle('title')
this.drawTitleSubtitle('subtitle')
}
drawTitleSubtitle(type) {
let w = this.w
const tsConfig = type === 'title' ? w.config.title : w.config.subtitle
let x = w.globals.svgWidth / 2
let y = tsConfig.offsetY
let textAnchor = 'middle'
if (tsConfig.align === 'left') {
x = 10
textAnchor = 'start'
} else if (tsConfig.align === 'right') {
x = w.globals.svgWidth - 10
textAnchor = 'end'
}
x = x + tsConfig.offsetX
y = y + parseInt(tsConfig.style.fontSize, 10) + tsConfig.margin / 2
if (tsConfig.text !== undefined) {
let graphics = new Graphics(this.ctx)
let titleText = graphics.drawText({
x,
y,
text: tsConfig.text,
textAnchor,
fontSize: tsConfig.style.fontSize,
fontFamily: tsConfig.style.fontFamily,
fontWeight: tsConfig.style.fontWeight,
foreColor: tsConfig.style.color,
opacity: 1
})
titleText.node.setAttribute('class', `apexcharts-${type}-text`)
w.globals.dom.Paper.add(titleText)
}
}
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0049 ]-- |