1

I need help trying to style the asp.net chart control. I have a doughnut chart that I need to style:

  • The background of the doughnut to be transparent so the underlying gradient shows through.
  • I'd like to move the legend to the bottom below the chart ... that way I can make a tall/thin chart

This is what it currently looks like. And I haven't found the right combinations of settings to make it happen. Thanks!

My current chart
(source: codecube.net)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Joel Martinez
  • 46,929
  • 26
  • 130
  • 185

1 Answers1

1

Try the following:

1 - Transparency

Chart.ChartAreas["ChartArea1"].BackColor = Color.Transparent;

2 - Legend

// Set legend docking
Chart.Legends["Default"].Docking = LegendDocking.Bottom;
Leniel Maccaferri
  • 100,159
  • 46
  • 371
  • 480
  • the docking one worked a charm, however, my chartareas collection is empty. Adding one and setting the backcolor property on that just results in an empty chart area underneath my chart :-( – Joel Martinez Jul 15 '10 at 14:09
  • Have you tried Chart.BackColor = Color.Transparent? Try to play with properties of the chart that contain the word Color. – Leniel Maccaferri Jul 16 '10 at 10:27