obv 선 표시
This commit is contained in:
@@ -45,6 +45,15 @@ export function plotColorCss(value: string): string {
|
||||
return `rgba(${r},${g},${b},${(alpha / 100).toFixed(2)})`;
|
||||
}
|
||||
|
||||
/** line 시리즈 색 — DB에 alpha 0·8자리 hex 저장 시 registry 기본색으로 복원 */
|
||||
export function resolvePlotLineColor(color: string | undefined, fallback: string): string {
|
||||
const raw = (color ?? fallback).trim();
|
||||
const fb = fallback.length >= 7 && fallback.startsWith('#') ? fallback.slice(0, 7) : '#2962FF';
|
||||
const { alpha } = parsePlotColor(raw);
|
||||
if (alpha < 10) return fb;
|
||||
return plotColorCss(raw);
|
||||
}
|
||||
|
||||
export const LINE_WIDTH_OPTIONS = [1, 2, 3, 4] as const;
|
||||
export const LINE_STYLE_OPTIONS: HLineStyle[] = ['solid', 'dashed', 'dotted'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user