Strings being converted to dates

M

Matt

I'm using OWC11 to plot a bar chart. The catergories are strings of the form
"Jan-2004", "Feb-2004", etc. I put these into some cells in a Spreadsheet
object. I put a single quote before each value to ensure the cell treats
them as strings (I have verified that they are strings in the cell).
However, when I call SetData for a series's categories, the chart converts
those strings to dates and displays them as such. Is there any way to
prevent the chart from converting strings that look like date into dates?

A few notes:
-Using delimited strings or arrays in SetData has the same problem
-Setting the NumberFormat for a category axis throws an exception
-The Caption property of the ChCategoryLabel object is read only.

Thanks,
-Matt
 
A

Alvin Bruney

Have you tried turning off time-scaling? This should fix the problem. Google
this newsgroup for the code to turn off time-scaling.

--

________________________
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
 
M

Matt

That did the trick.

Thanks,
-Matt

Alvin Bruney said:
Have you tried turning off time-scaling? This should fix the problem. Google
this newsgroup for the code to turn off time-scaling.

--

________________________
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
-------------------------------------------------------

Matt said:
I'm using OWC11 to plot a bar chart. The catergories are strings of the
form
"Jan-2004", "Feb-2004", etc. I put these into some cells in a Spreadsheet
object. I put a single quote before each value to ensure the cell treats
them as strings (I have verified that they are strings in the cell).
However, when I call SetData for a series's categories, the chart converts
those strings to dates and displays them as such. Is there any way to
prevent the chart from converting strings that look like date into dates?

A few notes:
-Using delimited strings or arrays in SetData has the same problem
-Setting the NumberFormat for a category axis throws an exception
-The Caption property of the ChCategoryLabel object is read only.

Thanks,
-Matt
 

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