Reputation: 427
I have got a series with a dashed line made with:
tmpChart.Series["function"].BorderDashStyle = ChartDashStyle.Dash;
But how can I change the spacing beween the dashes?
Upvotes: 3
Views: 691
Reputation: 427
Here is a little workaround to do it with alpha-sections:
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;
}
}
}
Upvotes: 1