Click here to Skip to main content
11,934,809 members (48,952 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB Visual-Studio VS2010 VB.NET , +

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?

Posted 16-Aug-12 0:30am
Edited 22-Aug-12 2:55am
Joan Murt 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 Murt 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 22-Aug-12 8:25am
What is the width of the chart?
joe_j 29-Aug-12 3:44am
about 188px
ryanb31 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
Please Sign up or sign in to vote.

Solution 1


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;

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 29 Nov 2012
Copyright © CodeProject, 1999-2015
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