LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to set a gradient stop position

I would like to create a gradient in my chart that goes from red to yellow.
If I just do a gradient fill it ends up looking more like orange to yellow
unless I set the first stop position (red side) to around 20%. How can I do
this via code? I can't find any method anywhere that might affect this.
Below is how I create the gradient (using C#).

// Get the series I want to fill with a gradient
Excel.Series series =
((Excel.SeriesCollection)((Excel.ChartGroup)chart. ChartGroups(1)).SeriesCollection(Type.Missing)).It em(2);

//Stop 1 : red stop position @ 20%
// 2: yellow
series.Fill.TwoColorGradient(Microsoft.Office.Core .MsoGradientStyle.msoGradientVertical, 1);
series.Fill.ForeColor.SchemeColor = 3; // red--is there a better
way to do this?
series.Interior.PatternColor = 0x00ffff; // yellow
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color gradient Mika Excel Programming 0 September 14th 08 11:44 AM
Two-Color Gradient Fill? Zone Excel Programming 3 November 24th 06 06:32 AM
How can I stop data labels reverting to a default position GARRETT RYAN Charts and Charting in Excel 0 October 18th 06 09:25 AM
Position of CellCursor on Screen (absolute position) [email protected] Excel Programming 1 November 23rd 05 02:23 AM
Cell Gradient dtutterow Excel Discussion (Misc queries) 0 November 20th 05 01:02 AM


All times are GMT +1. The time now is 08:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"