If you already have the values in the correct time format, there is no
need
to add a numberformat specifier. For instance, "12:00:00" will show as
entered. Or are you seeing something different?
--
________________________
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
-------------------------------------------------------
I tried to use the numberformat, but gets this error:
Invalid Parameter at OWC11.ChAxis.set_NumberFormat(String
pbstrNumberFormat)
This is my code:
strCategory = new System.Text.StringBuilder();
strCategory.Append("13:00:00" + '\t');
strCategory.Append("13:00:00" + '\t');
strCategory.Append("14:00:00" + '\t');
strCategory.Append("14:00:00" + '\t');
strValues = new System.Text.StringBuilder();
strValues.Append("1" + '\t');
strValues.Append("2" + '\t');
strValues.Append("3" + '\t');
strValues.Append("1" + '\t');
OWC11.ChartSpaceClass ChartSpace = new ChartSpaceClass();
ChartSpace.Charts.Add(0);
ChartSpace.Charts[0].SeriesCollection.Add(0);
ChartSpace.Charts[0].Type =
ChartChartTypeEnum.chChartTypeColumnClustered;
ChartSpace.Charts[0].Axes[0].Scaling.Minimum = 0;
ChartSpace.Charts[0].Axes[0].Scaling.Maximum = 50;
ChartSpace.Charts[0].Axes[0].HasTickLabels = true;
ChartSpace.Charts[0].SeriesCollection[0].SetData(OWC11.ChartDimensionsEnum.chDimSeriesNames,
(int)OWC11.ChartSpecialDataSourcesEnum.chDataLiteral,
"Uncorrectables");
ChartSpace.Charts[0].SeriesCollection[0].SetData(OWC11.ChartDimensionsEnum.chDimCategories,
(int)OWC11.ChartSpecialDataSourcesEnum.chDataLiteral,
strCategory.ToString());
ChartSpace.Charts[0].SeriesCollection[0].SetData(OWC11.ChartDimensionsEnum.chDimValues,
(int)OWC11.ChartSpecialDataSourcesEnum.chDataLiteral,
strValues.ToString());
ChartSpace.Charts[0].Axes[ChartAxisTypeEnum.chCategoryAxis].NumberFormat
=
"##:##:##";
Can you figure out what i'm doing wrong ?
Best regards,
Morten
:
Probably the simplest way forward involves using a format mask on the
numberformat property of the axis in question. Ex:
..numberformat = "##:##:##" or one of the appriate format specifiers
instead
of the format mask
--
________________________
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
-------------------------------------------------------
I'm trying to plot a chart where the category (x-axis) consists of
values
witch can be the same. The data I would like to show could for
instance
look
like this:
x = "12:42:00", "12:42:00", "12:43:00", "12:43:00"
y = 4, 5, 6, 4
How do I plot this, so that all values are shown ?
Best regards,
Morten