mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 07:20:08 +00:00
增加虚线Dash、点线Dot、点划线DashDot、双点划线DashDotDot等类型的折线图支持
This commit is contained in:
@@ -173,6 +173,22 @@ namespace XCharts
|
||||
nnp = i < serie.dataPoints.Count - 1 ? serie.dataPoints[i + 1] : np;
|
||||
isFinish = DrawStepLine(vh, serieIndex, serie, xAxis, lp, np, nnp, i, lineColor, areaColor, areaToColor, zeroPos);
|
||||
break;
|
||||
case LineType.Dash:
|
||||
ChartHelper.DrawDashLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
case LineType.Dot:
|
||||
ChartHelper.DrawDotLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
case LineType.DashDot:
|
||||
ChartHelper.DrawDashDotLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
case LineType.DashDotDot:
|
||||
ChartHelper.DrawDashDotDotLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
}
|
||||
if (isFinish) serie.animation.SetDataFinish(i);
|
||||
lp = np;
|
||||
@@ -312,6 +328,22 @@ namespace XCharts
|
||||
nnp = i < serie.dataPoints.Count - 1 ? serie.dataPoints[i + 1] : np;
|
||||
isFinish = DrawStepLine(vh, serieIndex, serie, yAxis, lp, np, nnp, i, lineColor, areaColor, areaToColor, zeroPos);
|
||||
break;
|
||||
case LineType.Dash:
|
||||
ChartHelper.DrawDashLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
case LineType.Dot:
|
||||
ChartHelper.DrawDotLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
case LineType.DashDot:
|
||||
ChartHelper.DrawDashDotLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
case LineType.DashDotDot:
|
||||
ChartHelper.DrawDashDotDotLine(vh, lp, np, serie.lineStyle.width, lineColor);
|
||||
isFinish = true;
|
||||
break;
|
||||
}
|
||||
if (isFinish) serie.animation.SetDataFinish(i);
|
||||
lp = np;
|
||||
|
||||
Reference in New Issue
Block a user