UNPKG

@alicloud/cloud-charts

Version:

![](https://img.shields.io/npm/v/@alicloud/cloud-charts?color=%23ff8200)

43 lines (42 loc) 1.26 kB
import { BaseChartConfig, Chart, Colors } from './types'; import { LabelConfig } from './label'; import { GeomSizeConfig } from './geomSize'; import { GeomStyleConfig } from './geomStyle'; export interface DrawLineConfig { /** 线条颜色 */ colors?: Colors; /** 面积颜色 */ areaColors?: Colors; /** 是否为面积图 */ area?: boolean | { geomStyle?: GeomStyleConfig; }; /** 是否为堆叠图,仅在 area: true 时生效 */ stack?: boolean; /** 是否线条平滑 */ spline?: boolean; /** 是否阶梯折线 */ step?: string | boolean; /** 是否展示线上点 */ symbol?: { shape: string; size?: GeomSizeConfig; geomStyle?: GeomStyleConfig; } | boolean; /** 数据label */ label?: LabelConfig | boolean; /** 线条宽度 */ lineWidth?: number; /** 元素样式 */ geomStyle?: GeomStyleConfig; /** 是否数据排序 */ sortable?: boolean; } /** * drawLine 绘制线图逻辑 * * @param {Chart} chart 图表实例 * @param {Object} config 配置项 * @param {string} yAxisKey 数据映射字段 * */ export default function drawLine(chart: Chart, config: DrawLineConfig & BaseChartConfig, yAxisKey?: string): void;