ASP.NET Chart Management Transparency

I work with the ASP.NET chart library, and it turns out that it generates a pie chart, but I had a problem setting it up to create a pie chart with translucent slices. If you look at the image, you will see what I'm talking about. Of the 4 pie charts, the top 2 and bottom left charts have the transparency of the sectors I'm talking about.

Charting control image
(source: scottgu.com )

What chart settings do I configure to render slices with a certain percentage of transparency?

Thanks!

+6
c # charts asp.net-charts
source share
3 answers

Try assigning the color of the series to a color with alpha transparency, for example:

Chart1.Series(0).Color = Color.FromArgb(128, 255, 0, 0) //transparent red 

Taken from this stream .

+8
source share

This is the ideal solution for both cases - one color for each series or chart palettes:

 myChart.ApplyPaletteColors(); foreach (var series in myChart.Series) { foreach (var point in series.Points) { point.Color = Color.FromArgb(220, point.Color); } } 
+1
source share

Try this:

 Series["SeriesName"].Color = Color.FromArgb(180, Color.Blue); 

Where 180 defines the "transparency level", which should be between 0 and 255.

You can use translucent palettes.

To refer to:

https://blogs.msdn.microsoft.com/alexgor/2009/10/06/setting-microsoft-chart-series-colors/

0
source share

All Articles