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CAAC,IAAM,eAAe,GAAG,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,iBAAiB,EAAE,EAAE;IACtE,kBAAkB;IAClB,OAAO,EAAE,uBAAuB;IAChC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IACnC,MAAM,EAAE;QACN,QAAQ,EAAE,UAAU;KACrB;IACD,UAAU,EAAE,SAAS;IACrB,WAAW,EAAE,SAAS;CACvB,CAAC,CAAC","sourcesContent":["import { Plot } from '../../core/plot';\nimport { deepAssign } from '../../utils';\n\nexport const Y_FIELD = '$$stock-range$$';\n\nexport const TREND_FIELD = 'trend';\nexport const TREND_UP = 'up';\nexport const TREND_DOWN = 'down';\n\n/** tooltip 配置 */\nexport const DEFAULT_TOOLTIP_OPTIONS = {\n showMarkers: false,\n showCrosshairs: true,\n shared: true,\n crosshairs: {\n type: 'xy',\n follow: true,\n text: (type, defaultContent, items) => {\n let textContent;\n if (type === 'x') {\n const item = items[0];\n textContent = item ? item.title : defaultContent;\n } else {\n textContent = defaultContent;\n }\n return {\n position: type === 'y' ? 'start' : 'end',\n content: textContent,\n style: {\n fill: '#dfdfdf',\n },\n };\n },\n // 自定义 crosshairs textBackground 样式\n textBackground: {\n padding: [2, 4],\n style: {\n fill: '#666',\n },\n },\n },\n};\n\n/**\n * 散点图 默认配置项\n */\nexport const DEFAULT_OPTIONS = deepAssign({}, Plot.getDefaultOptions(), {\n // 设置默认图表 tooltips\n tooltip: DEFAULT_TOOLTIP_OPTIONS,\n interactions: [{ type: 'tooltip' }],\n legend: {\n position: 'top-left',\n },\n risingFill: '#ef5350',\n fallingFill: '#26a69a',\n});\n"]}