vba Combined line and area chart in vba

travellerva

New Member
Joined
Mar 31, 2012
Messages
47
Office Version
  1. 365
Platform
  1. MacOS
I use a vba macro to generate a chart that combines 2 lines with an area within the same axes. I use the area data series to emphasize that data rather than using other line characteristics such as bold, color or line width. The following vba commands are written after the data series and other parameters of the chart are generated:


VBA Code:
ActiveChart.SeriesCollection(1).Smooth = True
        ActiveChart.SeriesCollection(2).Smooth = True
        ActiveChart.SeriesCollection(3).Select
        With Selection
            .Smooth = True
            .ChartType = xlArea
        End With

As can be seen, I want to have all 3 data series displayed with smoothed lines. However, although the 3rd line does show up as an area, there is no smoothing of the values. The other 2 lines are smoothed. I've tried reversing the ChartType and Smooth statements to no effect. Other than the lack of smoothing, all other displayed values and formats are correct.

Is it not possible to do what I want?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Area charts do not support smoothed line segments connecting the points.

I've been informally working on an algorithm to determine the coordinates of the smoothed curves, but it's rather a low priority for me, and I have to pay the bills :).
 
Upvote 0
Thanks for replying. The good news is that I now at least know it is not a standard supported feature that I just can't figure out how to use.
To be honest, although it's annoying, I'll live with the deficiency and wouldn't push hard for the feature, so keep it on your back burner!
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,215
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top