Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 19
Default Shading between lines chart type.

Currently I have consturcted a chart that shows a line for each column. The
chart has a median column, upper 80% column, upper 95% column, lower 80%
column, and a lower 95% column. This works just fine using
Excel.

XlChartType.xlLine

Now I would like a line showing the median, with shading up to the upper 80%
and down to the lower 80% of one color, and shading from median to upper 95%
and down to lower 95% another color. Since the upper 95% is always greater
than upper 80% the shading showing the 95% levels would only show up between
the 80% and 95% levels. The xl3DStacked type almost gets me there but the 3D
takes up too much room and there seems to be multiple colors that I don't
want. xlLineStacked seems to change the display of the data in a way that I
am unfamiliar with. Maybe "stacked" assumes that the columns are deltas. I
don't know. Any suggestions for getting the chart look that I described?
Simply put I want to be able to shade between lines. Alternatively if I had
more control over the stock type of chart where I could specify multiple
levels of the bar variance rather than just a high low etc.

Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 2,722
Default Shading between lines chart type.

Here's an article that talks about filling between lines. It might point you
in the right direction.
http://pubs.logicalexpressions.com/P...cle.asp?ID=590

Also, Jon Peltier has several examples of chart filling, that you might want
to look at:
http://peltiertech.com/Excel/Charts/BackgroundFill.html
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Kevin Burton" wrote:

Currently I have consturcted a chart that shows a line for each column. The
chart has a median column, upper 80% column, upper 95% column, lower 80%
column, and a lower 95% column. This works just fine using
Excel.

XlChartType.xlLine

Now I would like a line showing the median, with shading up to the upper 80%
and down to the lower 80% of one color, and shading from median to upper 95%
and down to lower 95% another color. Since the upper 95% is always greater
than upper 80% the shading showing the 95% levels would only show up between
the 80% and 95% levels. The xl3DStacked type almost gets me there but the 3D
takes up too much room and there seems to be multiple colors that I don't
want. xlLineStacked seems to change the display of the data in a way that I
am unfamiliar with. Maybe "stacked" assumes that the columns are deltas. I
don't know. Any suggestions for getting the chart look that I described?
Simply put I want to be able to shade between lines. Alternatively if I had
more control over the stock type of chart where I could specify multiple
levels of the bar variance rather than just a high low etc.

Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 19
Default Shading between lines chart type.

Maybe this isn't the right forum. I originally went to the VSTO forum but
they directed me here.

But I am having a hard time translating the Excel instructions into code. I
have the code:

try
{
ws.ListObjects.Add(Excel.XlListObjectSourceType.xl SrcRange,

ws.get_Range(((Excel.Range)ws.Cells[baseRow + 2, baseColumn + 1]),
((Excel.Range)ws.Cells[baseRow + projectedSalesList.Count + 2, baseColumn +
6])),
wb.missing,
Excel.XlYesNoGuess.xlYes,
wb.missing).Name = tableName;
if (!string.IsNullOrEmpty(tableFormat))
{
ws.ListObjects[tableName].TableStyle = tableFormat;
}
else
{
ws.ListObjects[tableName].TableStyle = "TableStyleLight1";
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
}
// Try to remove the previous chart
const string chartName = "ProjectedSalesDetailChart";
try
{
Excel.ChartObject chartObject = ws.ChartObjects(chartName)
as Excel.ChartObject;
if (chartObject != null)
{
chartObject.Delete();
}
}
catch (Exception)
{
// Eat the exception
// The chart probably doesn't exist
}
try
{
Excel.Shape shape =
ws.Shapes.AddChart(Excel.XlChartType.xlLine, wb.missing, wb.missing,
wb.missing, wb.missing);
shape.Name = chartName;
Excel.Chart chart = shape.Chart;
if (chart != null)
{

chart.SetSourceData(ws.ListObjects.get_Item(tableN ame).Range, wb.missing);
((Excel.Axis)chart.Axes(Excel.XlAxisType.xlCategor y,
Excel.XlAxisGroup.xlPrimary)).TickLabelPosition =
Excel.XlTickLabelPosition.xlTickLabelPositionHigh;
chart.HasTitle = true;
chart.ChartTitle.Text = heading;
chart.ChartArea.Width = chart.ChartArea.Width * 3;
chart.ChartArea.Height = chart.ChartArea.Height * 3;
chart.ApplyLayout(3, wb.missing);
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
}

So if I follow the instructions right I want to create a combination chart.
Which one of the steps above defines a series and a type? It seems that I
want to create a normal line series and on the same chart I want to create an
area series on the delta on the same chart. Let me get that far. Thank you.

Kevin

"Luke M" wrote:

Here's an article that talks about filling between lines. It might point you
in the right direction.
http://pubs.logicalexpressions.com/P...cle.asp?ID=590

Also, Jon Peltier has several examples of chart filling, that you might want
to look at:
http://peltiertech.com/Excel/Charts/BackgroundFill.html
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Kevin Burton" wrote:

Currently I have consturcted a chart that shows a line for each column. The
chart has a median column, upper 80% column, upper 95% column, lower 80%
column, and a lower 95% column. This works just fine using
Excel.

XlChartType.xlLine

Now I would like a line showing the median, with shading up to the upper 80%
and down to the lower 80% of one color, and shading from median to upper 95%
and down to lower 95% another color. Since the upper 95% is always greater
than upper 80% the shading showing the 95% levels would only show up between
the 80% and 95% levels. The xl3DStacked type almost gets me there but the 3D
takes up too much room and there seems to be multiple colors that I don't
want. xlLineStacked seems to change the display of the data in a way that I
am unfamiliar with. Maybe "stacked" assumes that the columns are deltas. I
don't know. Any suggestions for getting the chart look that I described?
Simply put I want to be able to shade between lines. Alternatively if I had
more control over the stock type of chart where I could specify multiple
levels of the bar variance rather than just a high low etc.

Thank you.

Reply
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
Shading Between the Lines Fodor Excel Discussion (Misc queries) 1 December 6th 07 12:19 PM
Shading between two lines [email protected][_2_] Charts and Charting in Excel 1 September 11th 07 09:57 AM
Shading between two lines on a chart [email protected][_2_] Excel Discussion (Misc queries) 0 September 10th 07 07:17 PM
Shading a portion of the space between two lines [email protected] Charts and Charting in Excel 3 March 22nd 07 08:28 PM
Adding a line Chart Type to a stacked-clustered Chart Type Debbie Charts and Charting in Excel 2 January 6th 05 12:25 AM


All times are GMT +1. The time now is 10:47 AM.

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

About Us

"It's about Microsoft Excel"