Re: NumberFormat for dates not working



Alvin,

I have looked at this article and it does not seem to help me.

This is what I am doing:

// Add the dates to the array
rgDates.Add(SqlData.GetDateTime(idxDate));

// Set the dates
Series.SetData(ChartDimensionsEnum.chDimCategories,
(int)ChartSpecialDataSourcesEnum.chDataLiteral,
rgDates.ToArray());

DateAxis.HasTitle = true;
DateAxis.NumberFormat = "MM/YYYY"

DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingNone;
// DateAxis.GroupingType = ChartAxisGroupingEnum.chAxisGroupingAuto;

If I comment out the chAxisGroupingNone line and uncomment the line
below then the date formatting works and I have no idea why!

Ian

Ian Hannah wrote:
Alvin,

Do you mean this article:

Subject: How to display text in the format hh:mm for a category label?

Thanks

--
Ian H


"Ian Hannah" wrote:


Alvin,

Thanks for the reply. Unfortunately I have not managed to find the article
that illustrates the workaround. Could you please give me the details on the
link?

Thanks

--
Ian H


"Alvin Bruney [MVP]" wrote:

about 4 weeks ago, the issue was identified and a work around was presented
in the newsgroup, please google for the solution

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


"Ian Hannah" <IanHannah@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:80BEBDBE-4DEC-4028-9762-6A89AEF3B2DA@xxxxxxxxxxxxxxxx

I am using OWC10 for creating a chart in ASP.NET. I am suing data read
from
a SQL Database and I am creating a Y axis and an X axis. The graph is
displaying data read at a number of different dates over a date range. The
x
axis is displaying the dates.

The problem I am having is that the date format is always MM/DD/YYYY
regardless of how the NumberFormat is set i.e. dates are always in US
format.
I have noticed that if I set the enumeration to either auto or manual the
dates show in the correct format but the graph it wrong. If I set it to
NumberFormatEnum.None then the graph is correct but the date format is
wrong.

Does anyone know what I am doing wrong or is there a bug in setting the
NumberFormat?

--
Ian H




.



Relevant Pages

  • Re: i need to generate a "distance" graph given x and y locations
    ... If you are saying you want to change the distance between the axis scale ... "David Biddulph" wrote: ... If you want to highlight a particular point, you can do that with Format ... graph, then you can plot the graph. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Temporal graphs on Schema2
    ... >> I am trying to make a simple graph of interest rates, ... >> up and down the Y axis and dates along the X axis. ... >> Does anyone have any ideas on how to display the X axis as I want it? ... Possibly format these to show only the integer part. ...
    (comp.sys.acorn.apps)
  • Re: NumberFormat for dates not working
    ... Warm regards, ... a SQL Database and I am creating a Y axis and an X axis. ... The problem I am having is that the date format is always MM/DD/YYYY ... dates show in the correct format but the graph it wrong. ...
    (microsoft.public.office.developer.web.components)
  • RE: Time Based Chart Query
    ... Your graph is simple graphing the data with the axis ... format the graph axis. ... and sums the data for that hour (Sum ...
    (microsoft.public.access.reports)
  • Re: NumberFormat for dates not working
    ... refering to in this newsgroup. ... Ian Hannah wrote: ... Subject: How to display text in the format hh:mm for a category label? ... displaying data read at a number of different dates over a date ...
    (microsoft.public.office.developer.web.components)