Click here to Skip to main content
15,916,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi all,

does anyone know how can I set the chart width to percentage 70%? I have tried to set tab container percentage to 100% and it works. but when I used the same method for chart, no chart is being generated out. When I set the chart width in pixel, it works. But I want to set the chart width in percentage instead of pixel.

This is my codes:
HTML
//Cs file: 

 AjaxControlToolkit.TabContainer container = new AjaxControlToolkit.TabContainer();
            container.ID = "TabContainer";
            container.EnableViewState = false;
            container.Tabs.Clear();
            container.Height = Unit.Pixel(1000);
            container.Width = Unit.Percentage(100);

Chart Chart1 = new Chart();
                        Chart1.DataSource = dt;
                        Chart1.Width = Unit.Percentage(70);
                        Chart1.Height = 450;

Question: How to set chart width to percentage 70%?

Appreciate if someone can help me on this, thanks a lot!!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900