ChartSpace right and left axis values

D

Dorte

This code adds the right axis to the chart with the same
values as the left axis.

Dim ch = ChartSpace1.Charts(0).SeriesCollection(1).Scalings
(ChartDimensionsEnum.chDimValues)

Dim objAxis = ChartSpace1.Charts(0).Axes.Add(ch,
ChartAxisPositionEnum.chAxisPositionRight,
ChartAxisTypeEnum.chValueAxis)
 
K

kevin

You need to add this before you create right axis.

ChartSpace1.Charts(0).SeriesCollection(1).Ungroup true

That is to say you can assign the series to an axis that
is based on a different value scale.

Then
You can add
Set axIncomeAxis = ChartSpace1.Charts(0).Axes.Add
(ChartSpace1.Charts(0).SeriesCollection(1).Scalings
(chConstants.chDimValues))
axIncomeAxis.Position = chConstants.chAxisPositionRight

It WILL work.
 
T

Thao Moua [ms]

Dorte, the code will not work for you since you are using
OWC9. The code will only for for OWC10 or greater.

Thao Moua
OWC Webchart Support

This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top