Search code examples
c#asp.netchartsasp.net-charts

Default 3D chart transparency with ASP.NET Chart Control?


like two guys before me there and second one there I have difficulty with 3D chart.

How to force them to be transparent like this picture: alt text

taken from 3D Area chart example shipped with ASP.NET Chart controls. This chart has ChartColorPalette.BrightPastel pallete, but is transparent.

I have also 3D chart with ChartColorPalette.BrightPastel palette, but is not transparent and I still cannot found way how to make it transparent like example chart. (After examining example markup and codebehind):

alt text

The only way I've found is to set the color of series with alpha channel for transparency, or use color palette with transparent colors (for example ChartColorPalette.SemiTransparent) but there must be some other default way which I'm missing.

Reason I really need this to know is that I'm creating graphs without any code behind just using markup, so I'm finding it a little bit redundant to create code snippets only because of this.

Thank you very much for any answers.

Edit: I'm using .NET 3.5 version of ASP.NET charts.


Solution

  • I'd same problem here. Solved using this:

    // After all series manipulation, add this
    chart.ApplyPaletteColors();
    foreach (var serie in chart.Series)
        serie.Color = Color.FromArgb(220, serie.Color);