OWC11 chart axis tick mark label positions

W

Westeee

Hi,
I'm successfully creating charts in C# and JavaScript, but need some help
with tick mark label positions.
I want to create a bar chart, value range 0-200, with CrossesAtValue = 100,
bars going to the left and right from the 100 axis value, and tick labels to
the left outside the plot area.
"CrossesAtValue = 100" correctly sets the category axis to 100.
However, the bars still start from zero, not outwards from 100, and the tick
mark labels are alongside the 100 axis.
In Excel charts, ".TickLabelPosition = xlLow" puts the labels outside to the
left, and the bars start automatically at 100.
Does anyone know how to do this for OWC11 charts?
 
A

Alvin Bruney [MVP]

the same approach in excel is applicable in the owc however you will need to
qualify xllow appropriately using the correct namespace. Have a look at the
helpfiles for the constant values.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
A

Alvin Bruney [MVP]

owc10ss*.chm or something close to that, it's been a while since i looked up
the help file

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Westeee said:
Thanks, Alvin.
Which helpfiles are these, please??
 
W

Westeee

Thanks again, Alvin.
It's OWCVBA11.CHM.
However, I can't see anything that refers to tick (mark) label positioning
in any of the enumerators.
Nor in the objects, methods and properties.
Am I missing the obvious, or is it just not possible?

Regards, Westeee.
 
A

Alvin Bruney [MVP]

Here's what I suggest, turn on the macro recorder in Excel and perform the
operation in Excel. View the macro and port the code over to OWC. If you use
vbscript, the code is directly portable, otherwise you'd have to do some
minor cleanup for javascript.

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
W

Westeee

Hi Alvin,

Thanks for your continuing support.
I'd tried it before, but the Excel macro gives -

ActiveChart.Axes(xlCategory).Select
With Selection
.MajorTickMark = xlOutside
.MinorTickMark = xlNone
.TickLabelPosition = xlLow
End With

The OWC MajorTickMark property is set in C# like this -

cChart.Axes[OWC11.ChartAxisTypeEnum.chCategoryAxis].MajorTickMarks =
OWC11.ChartTickMarkEnum.chTickMarkOutside;

But the axis has no "TickLabelPosition" property, and no enumeration that
looks like "low" for any label positioning.

I don't think it can be done.
 

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