A
Alvin Bruney [MVP]
Line 3 is failing with an invalid parameter exception. I understand that the
chart utilizes the regional date settings but my date settings are verified
and set to MM/dd/yyyy and my short date format shows up as 04/05/2004 after
a reboot.
Commenting out the groupingunit and groupingunittype lines results in a
successful graph being rendered. Have I possibly overlooked something?
object[] strCategory = {"04/05/2004","04/11/2004"};
string strValue = "291,359";
objChart.Axes[ChartAxisTypeEnum.chCategoryAxis].GroupingUnitType =
ChartAxisUnitTypeEnum.chAxisUnitMonth;
objChart.Axes[ChartAxisTypeEnum.chCategoryAxis].GroupingUnit = 1;
//Add a series to the chart's series collection
objChart.SeriesCollection.Add(0);
//add labels
objChart.SeriesCollection[0].DataLabelsCollection.Add();
objChart.SeriesCollection[0].SetData (ChartDimensionsEnum.chDimCategories,
(int)
ChartSpecialDataSourcesEnum.chDataLiteral, strCategory);
objChart.SeriesCollection[0].SetData (ChartDimensionsEnum.chDimValues,
(int)ChartSpecialDataSourcesEnum.chDataLiteral, strValue);
thanks
chart utilizes the regional date settings but my date settings are verified
and set to MM/dd/yyyy and my short date format shows up as 04/05/2004 after
a reboot.
Commenting out the groupingunit and groupingunittype lines results in a
successful graph being rendered. Have I possibly overlooked something?
object[] strCategory = {"04/05/2004","04/11/2004"};
string strValue = "291,359";
objChart.Axes[ChartAxisTypeEnum.chCategoryAxis].GroupingUnitType =
ChartAxisUnitTypeEnum.chAxisUnitMonth;
objChart.Axes[ChartAxisTypeEnum.chCategoryAxis].GroupingUnit = 1;
//Add a series to the chart's series collection
objChart.SeriesCollection.Add(0);
//add labels
objChart.SeriesCollection[0].DataLabelsCollection.Add();
objChart.SeriesCollection[0].SetData (ChartDimensionsEnum.chDimCategories,
(int)
ChartSpecialDataSourcesEnum.chDataLiteral, strCategory);
objChart.SeriesCollection[0].SetData (ChartDimensionsEnum.chDimValues,
(int)ChartSpecialDataSourcesEnum.chDataLiteral, strValue);
thanks