const horizontalCrosshairLine = (spec, context)=>{
    const result = {
        ...spec
    };
    const { advancedVSeed, vseed } = context;
    const { chartType } = vseed;
    const config = advancedVSeed.config?.[chartType]?.crosshairLine;
    if (!config) return result;
    if (!result.crosshair) result.crosshair = {};
    const visible = config.visible || true;
    const lineColor = config.lineColor || void 0;
    const labelColor = config.labelColor || void 0;
    const labelVisible = config.labelVisible || void 0;
    const labelBackgroundColor = config.labelBackgroundColor || void 0;
    const crosshair = result.crosshair;
    crosshair.yField = {
        visible,
        line: {
            type: 'line',
            style: {
                lineWidth: 1,
                opacity: 1,
                stroke: lineColor,
                lineDash: config.lineDash ?? [
                    4,
                    2
                ]
            }
        },
        label: {
            visible: labelVisible,
            labelBackground: {
                visible: labelVisible,
                style: {
                    fill: labelBackgroundColor
                }
            },
            style: {
                fill: labelColor
            }
        }
    };
    return result;
};
export { horizontalCrosshairLine };

//# sourceMappingURL=horizontalCrosshairLine.js.map