ÿØÿà JFIF ` ` ÿáfExif MM * i >ê 2 ê ê P ê ÿþ ?CREATOR: gd-jpeg v1.0 (usi
|
Server : Apache System : Linux gains.enterpriseappscloud.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : beyondlimi ( 2438) PHP Version : 7.4.33 Disable Function : allow_url_include, show_source, symlink, system, passthru, exec, popen, pclose, proc_open, proc_terminate,proc_get_status, proc_close, proc_nice, allow_url_fopen, shell-exec, shell_exec, fpassthru, base64_encodem, escapeshellcmd, escapeshellarg, crack_check,crack_closedict, crack_getlastmessage, crack_opendict, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid, dl, escap, phpinfo Directory : /home/beyondlimi/public_html/admin/assets/libs/apexcharts/src/modules/ |
Upload File : |
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)
}
}
}