Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VS2010 VB.NET MSChart
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 16-Aug-12 0:30am
joe_j4K
Edited 22-Aug-12 2:55am
v2
Comments
Joan Murt at 22-Aug-12 8:00am
   
Shouldn't you make it less wide in your dialog editor?
joe_j at 29-Aug-12 3:43am
   
Dialog editor? not quite sure how to do that.
Joan Murt at 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...
ryanb31 at 22-Aug-12 8:25am
   
What is the width of the chart?
joe_j at 29-Aug-12 3:44am
   
about 188px
ryanb31 at 29-Aug-12 7:49am
   
It's hard to tell you what to do when we can't see anything but you may want to adjust the width as well.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Hi,
 
try the below piece of code..
 
  //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;
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 325
1 DamithSL 300
2 Sergey Alexandrovich Kryukov 289
3 CPallini 235
4 Maciej Los 215
0 OriginalGriff 5,455
1 DamithSL 4,422
2 Maciej Los 3,860
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,010


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100