CImage scaling

If I Draw(...) a Cimage using my view's dc at the image's 
normal resolution, it looks ok. If I scale the image down 
by supplying a smaller destination rectange it looks 
pretty bad (like the palette is wrong or something), even 
though I'm keeping the aspect ratio the same. Is there a 
better way to scale them without writing custom scaling 
code?

Thanks

0
kermit1 (12)
10/5/2003 10:20:21 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
946 Views

Similar Articles

[PageSpeed] 28

Hi kermit,

Thanks for yuor post!

Maybe you should try the CImage::StretchBlt(...) instead of Draw() to scale 
your image down to a smaller destination rect. Here is the information 
about the StretchBlt() function:

Topic:"CImage::StretchBlt"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/
vcrefcimagestretchblt.asp

If this method doesn't resolve your problem, please post your corresponding 
program up if possible,  we would take more research on it.

Gary Chang
Microsoft Online Partner Support
Get Secure! � www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "guysmiley" <kermit@thefrog.com>
| Sender: "guysmiley" <kermit@thefrog.com>
| Subject: CImage scaling
| Date: Sun, 5 Oct 2003 03:20:21 -0700
| Lines: 10
| Message-ID: <07c101c38b2a$4834c110$a001280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOLKkg0i7UIvDRcQZ+fhB3a+PsxJw==
| Newsgroups: microsoft.public.vc.mfc
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.vc.mfc:393048
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.vc.mfc
| 
| If I Draw(...) a Cimage using my view's dc at the image's 
| normal resolution, it looks ok. If I scale the image down 
| by supplying a smaller destination rectange it looks 
| pretty bad (like the palette is wrong or something), even 
| though I'm keeping the aspect ratio the same. Is there a 
| better way to scale them without writing custom scaling 
| code?
| 
| Thanks
| 
| 

0
v-garych (605)
10/6/2003 8:29:57 AM
Hi Gary,

I've tried the StretchBlt(...) and it looks the same.
All I'm doing is calling an open file dialog. From there 
I use CImage::Load to load the image. This is for fitting 
my screen rectangle. It's just a simple percentage calc.

void CPicture::CalcAspectBound(CRect& r)
{
	boundBox.SetRectEmpty();
	int x = img.GetWidth();
	int y = img.GetHeight();
	float f = 0;
	if (x > r.Width())
	{
		f = (float)r.Width() / (float)x;
		x *= f;
		y *= f;
	}
	if (y > r.Height())
	{
		f = (float)r.Height() / (float)y;
		x *= f;
		y *= f;
	}
	boundBox.right = x;
	boundBox.bottom = y;
}

This is my code for drawing or stretchblt. The *pDC is 
what's handed in to the view's OnDraw.

		x = pic->GetImage().Draw(*pDC, 
headerBBox.left, headerBBox.top),
			pic->GetBoundBox().Width(), pic-
>GetBoundBox().Height());

That's it. It sizes fine. It just looks like crud. Like I 
mentioned, it looks like it's palette is turned into a 
256 color palette, but I don't know if it's the palette 
get's junked, or it's just the result of the compressed 
bits.

>-----Original Message-----
>Hi kermit,
>
>Thanks for yuor post!
>
>Maybe you should try the CImage::StretchBlt(...) instead 
of Draw() to scale 
>your image down to a smaller destination rect. Here is 
the information 
>about the StretchBlt() function:
>
>Topic:"CImage::StretchBlt"
>http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/vclib/html/
>vcrefcimagestretchblt.asp
>
>If this method doesn't resolve your problem, please post 
your corresponding 
>program up if possible,  we would take more research on 
it.
>
>Gary Chang
>Microsoft Online Partner Support
>Get Secure! - www.microsoft.com/security
>This posting is provided "AS IS" with no warranties,and 
confers no rights.
>
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "guysmiley" <kermit@thefrog.com>
>| Sender: "guysmiley" <kermit@thefrog.com>
>| Subject: CImage scaling
>| Date: Sun, 5 Oct 2003 03:20:21 -0700
>| Lines: 10
>| Message-ID: <07c101c38b2a$4834c110$a001280a@phx.gbl>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| 	charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| X-MimeOLE: Produced By Microsoft MimeOLE 
V5.50.4910.0300
>| Thread-Index: AcOLKkg0i7UIvDRcQZ+fhB3a+PsxJw==
>| Newsgroups: microsoft.public.vc.mfc
>| Path: cpmsftngxa06.phx.gbl
>| Xref: cpmsftngxa06.phx.gbl 
microsoft.public.vc.mfc:393048
>| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>| X-Tomcat-NG: microsoft.public.vc.mfc
>| 
>| If I Draw(...) a Cimage using my view's dc at the 
image's 
>| normal resolution, it looks ok. If I scale the image 
down 
>| by supplying a smaller destination rectange it looks 
>| pretty bad (like the palette is wrong or something), 
even 
>| though I'm keeping the aspect ratio the same. Is there 
a 
>| better way to scale them without writing custom 
scaling 
>| code?
>| 
>| Thanks
>| 
>| 
>
>.
>
0
kermit1 (12)
10/6/2003 11:35:54 AM
Hi kermit,

Thanks for your reply!

To get the palette of the resized image look well, you should sets the 
bitmap stretching mode first before use the StretchBlt(...) method drawing, 
code like this

::SetStretchBltMode(hdc, HALFTONE) ;
x = pic->GetImage().Draw(*pDC, headerBBox.left, headerBBox.top),
   pic->GetBoundBox().Width(), pic->GetBoundBox().Height());
   
Here is the SetStretchBltMode(...) API's documention:
Windows GDI: SetStretchBltMode
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/bitmaps
_6cth.asp

Wish your code works fine!

Gary Chang
Microsoft Online Partner Support
Get Secure! � www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "guysmiley" <kermit@thefrog.com>
| Sender: "guysmiley" <kermit@thefrog.com>
| References: <07c101c38b2a$4834c110$a001280a@phx.gbl> 
<xXlBHQ#iDHA.2556@cpmsftngxa06.phx.gbl>
| Subject: RE: CImage scaling
| Date: Mon, 6 Oct 2003 04:35:54 -0700
| Lines: 112
| Message-ID: <138801c38bfe$00a40890$a101280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| 	charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOL/gChrDu7tY1ESwCkHnUbYchZAw==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.vc.mfc
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.vc.mfc:393134
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.vc.mfc
| 
| Hi Gary,
| 
| I've tried the StretchBlt(...) and it looks the same.
| All I'm doing is calling an open file dialog. From there 
| I use CImage::Load to load the image. This is for fitting 
| my screen rectangle. It's just a simple percentage calc.
| 
| void CPicture::CalcAspectBound(CRect& r)
| {
| 	boundBox.SetRectEmpty();
| 	int x = img.GetWidth();
| 	int y = img.GetHeight();
| 	float f = 0;
| 	if (x > r.Width())
| 	{
| 		f = (float)r.Width() / (float)x;
| 		x *= f;
| 		y *= f;
| 	}
| 	if (y > r.Height())
| 	{
| 		f = (float)r.Height() / (float)y;
| 		x *= f;
| 		y *= f;
| 	}
| 	boundBox.right = x;
| 	boundBox.bottom = y;
| }
| 
| This is my code for drawing or stretchblt. The *pDC is 
| what's handed in to the view's OnDraw.
| 
| 		x = pic->GetImage().Draw(*pDC, 
| headerBBox.left, headerBBox.top),
| 			pic->GetBoundBox().Width(), pic-
| >GetBoundBox().Height());
| 
| That's it. It sizes fine. It just looks like crud. Like I 
| mentioned, it looks like it's palette is turned into a 
| 256 color palette, but I don't know if it's the palette 
| get's junked, or it's just the result of the compressed 
| bits.
| 
| >-----Original Message-----
| >Hi kermit,
| >
| >Thanks for yuor post!
| >
| >Maybe you should try the CImage::StretchBlt(...) instead 
| of Draw() to scale 
| >your image down to a smaller destination rect. Here is 
| the information 
| >about the StretchBlt() function:
| >
| >Topic:"CImage::StretchBlt"
| >http://msdn.microsoft.com/library/default.asp?
| url=/library/en-us/vclib/html/
| >vcrefcimagestretchblt.asp
| >
| >If this method doesn't resolve your problem, please post 
| your corresponding 
| >program up if possible,  we would take more research on 
| it.
| >
| >Gary Chang
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >This posting is provided "AS IS" with no warranties,and 
| confers no rights.
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "guysmiley" <kermit@thefrog.com>
| >| Sender: "guysmiley" <kermit@thefrog.com>
| >| Subject: CImage scaling
| >| Date: Sun, 5 Oct 2003 03:20:21 -0700
| >| Lines: 10
| >| Message-ID: <07c101c38b2a$4834c110$a001280a@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| 	charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MimeOLE: Produced By Microsoft MimeOLE 
| V5.50.4910.0300
| >| Thread-Index: AcOLKkg0i7UIvDRcQZ+fhB3a+PsxJw==
| >| Newsgroups: microsoft.public.vc.mfc
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl 
| microsoft.public.vc.mfc:393048
| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| X-Tomcat-NG: microsoft.public.vc.mfc
| >| 
| >| If I Draw(...) a Cimage using my view's dc at the 
| image's 
| >| normal resolution, it looks ok. If I scale the image 
| down 
| >| by supplying a smaller destination rectange it looks 
| >| pretty bad (like the palette is wrong or something), 
| even 
| >| though I'm keeping the aspect ratio the same. Is there 
| a 
| >| better way to scale them without writing custom 
| scaling 
| >| code?
| >| 
| >| Thanks
| >| 
| >| 
| >
| >.
| >
| 

0
v-garych (605)
10/7/2003 11:07:56 AM
Reply:

Similar Artilces:

xy chart --> x and y axes scales min and max
I use Tushar Mehta's Automatic Chart Limits add-in for primary and secondary values for many of my charts and I wonder if someone can point me to any similar existing code/add-ins to link the min and max values for the Y axis, and the min and max values for the X axis to values calculated in four cells. My thanks in advance for any direction here. Brad In article <O#9hNIc#FHA.3308@TK2MSFTNGP11.phx.gbl>, lreid@flash.net says... > I use Tushar Mehta's Automatic Chart Limits add-in for primary and secondary > values for many of my charts and I wonder if someone can ...

Scale Limits
Hi, Is it possible to drive the max and mins of a y-axs on a chart from cells S6 and S7 of the same worksheet? This way it updates with changes to data without showing everything. Thanks LiAD You need a little VBA for this. Here's how: Link Chart Axis Scale Parameters to Values in Cells (VBA) http://peltiertech.com/Excel/Charts/AxisScaleLinkToSheet.html - Jon ------- Jon Peltier Peltier Technical Services, Inc. http://peltiertech.com/ On 3/26/2010 10:09 AM, LiAD wrote: > Hi, > > Is it possible to drive the max and mins of a y-axs on a chart from ce...

Setting x axis scale to time with variable intervals
I want to chart observations made at random intervals throughout the day on an area chart. If i use x-y scatter, the x-axis spacing is correct (points are proportional to the time), but i can't get an area chart. If I use the area chart, the observations are all spaced equally along the x axis. Does anyone know how to make the x-axis plot time for normal charts? The XY Scatter chart is what I call a "normal" chart, because the X and Y axes are both numerical. That's my scientific background coming out. Other types of charts, such as column, line, and area, have a ...

I want my Secondary scale to match the primary scale.
-- Zevets Access Mdb On Fri, 9 Nov 2007 05:28:04 -0800, Zevets <Zevets@discussions.microsoft.com> wrote: Please use the big textbox to explain what you mean. Is this a Microsoft Access form you're using? What "scale" do you mean? In what way should they "match"? John W. Vinson [MVP] I have an Access Form!Graph(FG) and I am using a query to created a table which feed data to the FG. The FG has to types of data in it. One uses the Scale on the left and the other the scale on the right, both of which free floats besed upon the range of numbers...

How to set scaling factors and decimal places on KPIs
Hi All I want to set scaling factors on KPIs. Like if the value is $15,000,000 I want to display it as 15 scaling it to millions and set decimal places to 1 . Most reporting tools support setting scaling factors like to scale number to 10s 100s 1000s not sure how I can do this in SSRS setting scaling and decimal places. I do not want to create a calculated field to scale I already have 70 or 80 metrics in the report I do not want to create more scaling them. Appreciate if you can kindly share ideas how I can set these in SSRS Thanks Karen works similar to Excel's for...

Thumbnail image from CImage
Hello, Please help to get thumbnail image from CImage object and save on drive in ATL project. I have : CImage Chart; Chart.Attach(hBit); How to resize Chart? How to save it? Regards, Leonid ...

Help about CImage!!!
I want use CImage, so I include atlimage.h and compile, I got following error: C:\Program Files\Microsoft Visual Studio ..NET\Vc7\atlmfc\include\atltrace.h(53): error C2833: 'operator DWORD_PTR' is not a recognized operator or type error C2833: 'operator DWORD_PTR' is not a recognized operator or type What's happen? and how to solve it? Thank you help! Hi Bruce, I cannot repro the problem, but it sounds like your header files aren't set up properly. Somewhere or another DWORD_PTR isn't getting defined (based on the error message). DWORD_PTR is defined in the ...

Scaled printing
This may be a Vista Office problem in general, but here goes: I have created a poster that is 36"x24". I want to scale the document down so I can take an 8.5"x11" sample to the print shop when I go. I have gone to File.Print and selected the properties button. Then I select the tab titled "Effects" to select either "Print Document on Letter and Scale to Fit" or "25% of normal size" but neither option actually changes the way the document prints. Publisher is still committed to printing the 12 sheets of paper and tiling the printing. Wha...

CImage
Hi, I am using CImage like this: CImage img; img.Create(200, 200, 24); // Make every pixel red. for (int y = 0; y < 200; y++) for (int x = 0; x < 200; x++) { img.SetPixelRGB(x, y, 255, 0, 0); } img.Save("test.bmp"); /// later on I load it back to see if I can read the colors back ok. CImage imgBackIn; imgBackIn.Load("test.bmp"); COLORREF *pclr = (COLORREF*)(imgBackIn.GetPixelAddress(50, 50)); printf("The color at 50,50 is: %i,%i,%i", GetRValue(*pclr), GetGValue(*pclr), GetBValue(*pclr)); But this pri...

Convert CAD drawings - saves as wrong scale
I use Visio 2003 Professional to convert CAD drawings (provided by Architects) to maintain simplified floor plans of our facilities and to calculate space areas. Up until recently this process has worked fine. ie using Visio to open and convert a CAD drawing to Visio format. This process no longer works correctly for the newer CAD drawings, (version 2002 and later). The drawing will convert but the "scale" is no longer accurate. In sense making the drawing useless. Is there something that should be done or I should know to fix this?? ...

Print Range Scaling in Access
Is there any way in Access to Scale Query Results to fit on a page like in Excel? TIA Dennis Dennis Have you tried the Access group? But no, I don't think that there is. You could import a query into Excel though and if that works OK try importing a Report. Regards Peter >-----Original Message----- >Is there any way in Access to Scale Query Results to fit on a page like in Excel? > >TIA Dennis >. > ...

About CImage
Hello to everybody, I have the following code: #include "stdafx.h" #include <atlimage.h> //CImage Declaration #include <Gdiplusimaging.h> .... IStream *strm; .... CImage img; //ImageFormatBMP is declared in Gdiplusimaging.h img.Save(strm, ImageFormatBMP); And I have the following error: d:\Samples\HECImage\HECImage.cpp(118): error C2065: 'ImageFormatBMP' : undeclared identifier What do I miss here? Thank you all. Try Gdiplus::ImageFormatBMP and see if it works. --- Ajay "gdrivas" <gdrivas@discussions.microsoft.com> wrote in message new...

CImage scaling
If I Draw(...) a Cimage using my view's dc at the image's normal resolution, it looks ok. If I scale the image down by supplying a smaller destination rectange it looks pretty bad (like the palette is wrong or something), even though I'm keeping the aspect ratio the same. Is there a better way to scale them without writing custom scaling code? Thanks Hi kermit, Thanks for yuor post! Maybe you should try the CImage::StretchBlt(...) instead of Draw() to scale your image down to a smaller destination rect. Here is the information about the StretchBlt() function: Topic:&q...

Scale on X & Y Axis of the scatter chart
I have a problem on setting the scale of X & Y axis of the scatter chart. I found that the scale of the X & Y axis of the scatter chart are not consistent. For example, 10cm represents 100 units on the Y-axis , however, 10cm represents 500 units on the X-axis. How can I set the X & Y axis with the same scale. This is a very urgent case, as I need to submit the graph to my supervisor within a hour. Please help to solve it. Thank you Eugene -- chanyke ------------------------------------------------------------------------ chanyke's Profile: http://www.excelforum.com/m...

Using CImage?
I am trying to use CImage for the first time. I give the code schematically below. CImage::Save() is not working for me. Am I missing some important step? The HRESULT indicates an unknown error. (Stepping through image.Save(), I see it succeeding until the last step Gdiplus::Bitmap bm( m_hBitmap, NULL ); status = bm.Save( pwszFileName, &clsidEncoder, NULL ); which fails.) ================ The code: Schematically I have HBITMAP hBitmap = ......; // I then call a debugging routine which displays the bitmap // in a dialogue: it looks ok. // I now want to save it as a GIF T...

Colors/Scale in Radar Charts
Is there a way to make the background colors in a radar chart different than white? I need to create a radar chart with four ranges from center out - dark green in center, next region out is light green, next region is yellow, and the outer band is red. Also, can I make the scale not be equal (e.g. 0-33%, 33-66%, 66%-90%, 90%-100%)? Thanks for any help. Jeff Hi, You can use 4 additional series charted as filled radar to give the zone shading. Start by creating a radar using all 5 columns of data. Select the actual data series and move to the secondary axis. You can now change the c...

X-axis scale #4
Any help would be appreciated... I want to have a column graph where I show the number of customer meetings necessary before a sale is completed. I have a graph where the X axis is the number of times that a customer has been met before a sale has been completed. The Y axis is the number of clients for each number of sale meetings. Therefore it shows for example that 6 customers took 10 sales meetings, 8 customers took 7 sales meetings and 9 customers took 4 sales meetings before sale. N 12 O. 11 10 O 9 * F 8 * 7 C 6 ...

How do I change the scale on the y axis to letters?
I wish to change the Y axis scale on an Excel line graph from numbers to letters. Any ideas? Thanks You can hide the default axis labels and add a series along the Y axis that has the desired text as data point labels. http://peltiertech.com/Excel/Charts/ArbitraryAxis.html http://peltiertech.com/Excel/Charts/Y_CategoryAxis.html - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Standard." <Standard.@discussions.microsoft.com> wrote in message news:D988691B-B0F7-4B3B-AAFB-1AF78...

Resizing CImage
Hi does anybody know how to resize a CImage object ? My code is as follows: CImage image; image.Load(_T("C:\\test1.bmp")); CDC *pMDC = new CDC; pMDC->CreateCompatibleDC(NULL); CBitmap *pb = new CBitmap; pb->CreateCompatibleBitmap(pMDC, 70, 70); CBitmap *pob = pMDC->SelectObject(pb); int w = image->GetWidth(); int h = image->GetHeight(); image->StretchBlt(pMDC->m_hDC,0, 0, 70, 70, 0, 0, w, h, SRCCOPY); pMDC->SelectObject(pob); CImage new_image; new_image.Attach((HBITMAP)(*pb)); new_image.Save(_T("c:\\new_image.bmp"...

Using CImage
Hi, I Made a file containing multiple graphic files by reading .jpg files and writing it to 1 file. Now I want to load the graphics in CImage structures. CImage.Load can only take filenames an IStream*, but since I put all the images in 1 big file i can't use the first. I can't find a way to load them from an IStream. Can someone help me with that? What i Have is: //////// HGLOBAL hGlobal = GlobalAlloc(GMEM_FIXED, len); //len = the length of the jpg IStream* stream; CreateStreamOnHGlobal(hGlobal, true, &stream); file.Read(stream, len); //file is a CFile object pointing to the big...

scale on scatter
hi i have tried a few ways to alter the scale on the x axis of a scatter graph but so far not found a way to do it as i would like. my data point are at: 2 4 8 16 32 64 etc i want the axis to start at 2 but have major markers at 8 16 24 32 etc (8 seperations) the problem is when i set the min to 2 i cant get the divisions to line up with 8 16 instead they are 10 18 etc if i set the axis to min 0 and set the axis cross bit to 2 i get a horrid bit to the left of the axis which i do not want. does anyone know how i can set the axis to a point but not have it going to the left of the ax...

Scaling problem
I'm trying to print a 10 x 7 inch two sided card. On the screen the size is correct. The paper I'm printing on is 8.5 x 11 (standard letter). When it prints the 7 inch direction is correct the 10 inch direction is being reduced by about 1/8 inch. So when I print each side, they don't line up. Everything was working fine for a while. My guess is I did something to confuse my computer - so it's teaching me a lesson and confusing me back. Does anybody know how I can fix this problem? Thanks, Peter It may have something to do with your printer margin limitations. Ta...

How Do I adjust double line walls to print to scale?
When I use single line drawing 1/4 scale, It prints exactly to scale but when I draw with double lines the scale is off. The longer the wall the more incorrect it is. If I draw a 10' wall it appears okay but when I draw a 60' wall it's 2-3 feet off. Can I adjust this? If so. How? Lonnie ...

Y scale for P. ie when P$= 2, QD=10 & QS=3 P needs to be Y scale
I am trying to create a graph the compares Quantity Demanded and Supplied in relation to a particular price to find the equilibrium (intersection). The problem is, I have no idea how to make one row the Y scale in my graph. and the other two (QD and QS) the two line graphs which should intersect. For example at a price $0, the QD is 11 units and the QS is 0. At a price $ 4 the QD is 9 units and the QS is 3 units. So as price increases/decreases, demand and supply changes! Hi, Maybe Tushar Mehta's page can help you out. http://tushar-mehta.com/excel/charts/supply_and_demand/ Cheers ...

chart scale
I have a chart that shows pay per hour and pay in thousands. On the chart the pay per hour bars do not display, and you can only see the year salary in thousands. The range of the chart is 0-140,00. I need to expand the 0-30 range without throwing the rest of the chart off whack. I can not figure it out! Help! You could plot one series on the secondary axes. Double click the series, and on the Axis tab, choose Secondary. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Gia" <Gia@discussions.microsoft.com> wro...