J
Jeff Donkersgoed
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)).Item(2);
//Stop 1 : red stop position @ 20%
// 2: yello
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
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)).Item(2);
//Stop 1 : red stop position @ 20%
// 2: yello
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