|
Transparent Effect |
Posted by Balaji on Apr-29-2011 17:23 |
|
Dear Team,
I using Chart director to draw a dial chart.
I set the backcolor of the Chart director to transparent and its working fine.
Then while drawing the dial chart using Angular meter, when I set the background color to
Chart.Transparent, the angular meter background becomes black.
Please help me to set Angular meter background to transparent.
My code for angular meter,
AngularMeter Dial = new AngularMeter(chartViewer.Width, chartViewer.Height,
Chart.Transparent);
Thanks & regards,
Balaji |
Re: Transparent Effect |
Posted by Peter Kwan on Apr-29-2011 23:56 |
|
Hi Balaji,
Are you writing a web application or a desktop application?
For a web application, there are two types of transparency - alpha transparency and single color transparency. You may use BaseChart.setTransparentColor to configure which type of transparency to use for the output image to the browser. See the documentation on "BaseChart.setTransparentColor" for more details.
For a desktop application, ChartDirector should automatically make the image transparent if the GUI framework supports transparency (eg. Java SWING). Note that many GUI frameworks do not support transparency (eg. .NET Windows Forms, MFC, VB6, etc). If you are using a GUI framework that does not support transparency, you would need to set the background color of the chart to the same color as the Form background.
For desktop applications, to check if your GUI framework supports transparency, you can try to put a standard "TextBox control" (many GUI frameworks have similar controls) on top of the chart, and see if you can make the TextBox control transparent (so you can see the chart underneath) and still be able to display text. If you cannot make the TextBox control transparent, that probably means the GUI framework does not support transparency.
Hope this can help.
Regards
Peter Kwan |
|