2

Is there a possibility to add a footer line into a chart created with Microsoft Chart Controls for .net 4. I would like to place a logo (png-image) on the left side and a text on the right side of this line.

As a possibility, it came into my mind to add the footer to the resulting image after rendering the chart or setting a background image, but maybe there is an integrated and better possibility that I have missed?

HCL
  • 36,053
  • 27
  • 163
  • 213

1 Answers1

2

The chart samples have a section on using PrePaint and PostPaint events to customize the graphs. Adding a handler to the PrePaint could help you with customizing the graph canvas.

Chart Features > Customization and Events > PrePaint and PostPaint Events.

The samples are here btw: http://archive.msdn.microsoft.com/mschart

zeFrenchy
  • 6,541
  • 1
  • 27
  • 36
  • +1 Thanks, drawing works perfect like you described. But how can I reserve the extra space needed for the footer line? – HCL Jul 20 '11 at 17:59
  • You probably can't rely on auto positioning if you need to reserve space. Samples section on manual positioning: Chart features > Chart Areas > Chart Area and plotting Area Positions – zeFrenchy Jul 21 '11 at 08:29
  • I have added a Title-Element for the text that also reserves the space for the logo that is drawn in the PostPaint-Event. Thanks for your help. – HCL Jul 21 '11 at 09:51