折线图
Alpha折线图通过直线连接数据点,直观展示连续轴上的趋势或关系。
安装
仅适用于 Vue >3.3 版本
API
Prop
data
Record<string, any>[]Required*The source data, in which each entry is a dictionary.
categories
string[]Required*Select the categories from your data. Used to populate the legend and tooltip.
index
stringRequired*Sets the key to map the data to the axis.
colors
string[]Change the default colors.
margin
SpacingMargin of each the container
filterOpacity
numberChange the opacity of the non-selected field
xFormatter
((tick: number | Date, i: number, ticks: number[] | Date[]) => string)Function to format X label
yFormatter
((tick: number | Date, i: number, ticks: number[] | Date[]) => string)Function to format Y label
showXAxis
booleanControls the visibility of the X axis.
showYAxis
booleanControls the visibility of the Y axis.
showTooltip
booleanControls the visibility of tooltip.
showLegend
booleanControls the visibility of legend.
showGridLine
booleanControls the visibility of gridline.
customTooltip
ComponentRender custom tooltip component.
curveType
CurveTypeType of curve
Emit
legendItemClick
[d: BulletLegendItemInterface, i: number]示例
迷你趋势图
通过隐藏坐标轴、网格线和图例,可将图表转换为迷你趋势图。
自定义提示框
如需渲染自定义提示框,可轻松传入自定义组件。具体属性定义请参考此文档。