Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

493 B
Raw Blame
import type { ChartStyle } from '~/queries/schema/schema-general'

// The schema vocabulary is 'smooth'/'linear'; quill's chart config calls the same shapes
// 'monotone'/'linear', so 'smooth' maps to 'monotone'. Unset falls through to the app default.
export function chartStyleCurve(chartStyle: ChartStyle | null | undefined): 'linear' | 'monotone' | undefined {
    if (!chartStyle?.curve) {
        return undefined
    }
    return chartStyle.curve === 'smooth' ? 'monotone' : 'linear'
}