我有一组由虚线制成的系列,使用以下方法制作:
tmpChart.Series["function"].BorderDashStyle = ChartDashStyle.Dash;
但是我怎么改变破折号之间的间距呢?
这个小技巧可以帮助您完成字母分组:
private void SetChartTransparency(Chart chart, string Seriesname)
{
bool setTransparent = true;
int numberOfPoints = 3;
chart.ApplyPaletteColors();
foreach (DataPoint point in chart.Series[Seriesname].Points)
{
if (setTransparent)
point.Color = Color.FromArgb(0, point.Color);
else
point.Color = Color.FromArgb(255, point.Color);
numberOfPoints = numberOfPoints - 1;
if (numberOfPoints == 0)
{
numberOfPoints = 3;
setTransparent = !setTransparent;
}
}
}