优化自定义绘制回调接口

This commit is contained in:
monitor1394
2021-03-29 20:27:21 +08:00
parent da383c80ae
commit 5b5483915b
7 changed files with 56 additions and 11 deletions

View File

@@ -24,7 +24,13 @@ namespace XCharts.Examples
chart.onCustomDraw = delegate (VertexHelper vh)
{
var dataPoints = chart.series.list[0].dataPoints;
};
// or
chart.onCustomDrawSerie = delegate (VertexHelper vh, Serie serie)
{
if (serie.index != 0) return;
var dataPoints = serie.dataPoints;
if (dataPoints.Count > 0)
{
var pos = dataPoints[3];
@@ -35,6 +41,11 @@ namespace XCharts.Examples
UGL.DrawCricle(vh, pos, 5, Color.blue);
}
};
// or
chart.onCustomDrawTop = delegate (VertexHelper vh)
{
};
}
}
}