Click here to Skip to main content
15,860,861 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I'm using MS chart control that comes with VS2010.
I have one StackedColumn chart with 4 Bars.

I have adjusted the inner position property of the chart area, however, the chart still keeps some amount of blank space on the left and right which is actually wasting the space on the webpage that I am designing.

Could anyone help me on how to compact the chart so that there is no space wasted on the sides?

Regards
Joe
Posted
Updated 22-Aug-12 1:55am
v2
Comments
Joan M 22-Aug-12 8:00am    
Shouldn't you make it less wide in your dialog editor?
joe_j 29-Aug-12 3:43am    
Dialog editor? not quite sure how to do that.
Joan M 29-Aug-12 3:54am    
Well, from where you've inserted the chart control into your dialog... the chart control should have properties amongst them the width of the control itself...
ZurdoDev 22-Aug-12 8:25am    
What is the width of the chart?
joe_j 29-Aug-12 3:44am    
about 188px

1 solution

Hi,

try the below piece of code..

C#
//To position Inner plotting area in % of  chart
          Chart1.ChartAreas[0].InnerPlotPosition.Auto = false;
          Chart1.ChartAreas[0].InnerPlotPosition.Width = 100;
          Chart1.ChartAreas[0].InnerPlotPosition.Height = 100;
 
Share this answer
 

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