We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
9.8.12
我发现当在 iOS 设备上使用 KLineCharts 库时,priceMark 的价格标记在垂直方向上没有居中对齐。请看图片。
出现了如上图所示的偏移现象。
调整为两边对称。
- OS: iOS 18.2.1 - Browser: WebView IOS - Framework: Flutter
No response
The text was updated successfully, but these errors were encountered:
Temporary solution:
file : /src/extension/figure/text.ts
export function drawText( ctx: CanvasRenderingContext2D, attrs: TextAttrs | TextAttrs[], styles: Partial<TextStyle>, ): void { let texts: TextAttrs[] = [] texts = texts.concat(attrs) let { color = 'currentColor', size = 12, family, weight, paddingLeft = 0, paddingTop = 0, paddingRight = 0, } = styles const rects = texts.map((text) => getTextRect(text, styles)) drawRect(ctx, rects, { ...styles, color: styles.backgroundColor }) ctx.fillStyle = color ctx.textAlign = 'left' ctx.textBaseline = 'top' ctx.font = createFont(size, weight, family) // Fix bug where content is not centered vertically on iOS devices // if (isIOS()) { paddingTop -= 2 } texts.forEach((text, index) => { const rect = rects[index] ctx.fillText( text.text, rect.x + paddingLeft, rect.y + paddingTop, rect.width - paddingLeft - paddingRight, ) }) }
Sorry, something went wrong.
No branches or pull requests
Version
9.8.12
Steps to Reproduce
我发现当在 iOS 设备上使用 KLineCharts 库时,priceMark 的价格标记在垂直方向上没有居中对齐。请看图片。
Current Behavior
出现了如上图所示的偏移现象。
Expected Behavior
调整为两边对称。
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: