Hello,
I recently went to upgrade the references in our projects from 2011.1 to 2011.2. Everything went fine save one small issue: The axis information is set programmatically, and in the function that does the axis setting I'm getting a notification that X and Y axis are set as private. According to the documentation both fields are still public and this error results whether I manually upgrade or use the versioning utility.
At this point in time it's preventing us from upgrading. Does anyone have insight as to exactly what might be going on here? Thank you.
This is the code that generates the issue:
private static CategorySeries SetCommonLineProperties( CategorySeries categorySeries, ISeriesViewModel viewModel, CategoryXAxis xAxis, NumericYAxis yAxis ) { categorySeries.MarkerType = MarkerType.None; categorySeries.Thickness = viewModel.LineThickness > 0 ? viewModel.LineThickness : 1; categorySeries.ItemsSource = viewModel.Data; categorySeries.Title = viewModel.Name; categorySeries.YAxis = yAxis; categorySeries.XAxis = xAxis; if ( !String.IsNullOrEmpty( viewModel.LineBrush ) ) { categorySeries.Brush = GetBrush( viewModel.LineBrush, viewModel.LineBrushType ); } return categorySeries; }
CategorySeries categorySeries, ISeriesViewModel viewModel, CategoryXAxis xAxis, NumericYAxis yAxis ) { categorySeries.MarkerType = MarkerType.None; categorySeries.Thickness = viewModel.LineThickness > 0 ? viewModel.LineThickness : 1; categorySeries.ItemsSource = viewModel.Data; categorySeries.Title = viewModel.Name; categorySeries.YAxis = yAxis; categorySeries.XAxis = xAxis; if ( !String.IsNullOrEmpty( viewModel.LineBrush ) ) { categorySeries.Brush = GetBrush( viewModel.LineBrush, viewModel.LineBrushType ); } return categorySeries; }
I have been looking into your question and the X and Y axis are still a public properties in NetAdvantage11.2. I tried to reproduce your error message but everything worked as expected. I am attaching the sample that I have implemented in order to recreate the mentioned behavior, so you can compare with your project and check the differences.
Please do not hesitate to contact us in case of future difficulties regarding that matter.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Infragistics
Hello, I had attempted to run your sample; however upon opening it presented me with warnings as to the members being marked private. Additionally an attempt to build resulted in this warning:
'Infragistics.Controls.Charts.CategorySeries' does not contain a definition for 'YAxis' and no extension method 'YAxis' accepting a first argument of type 'Infragistics.Controls.Charts.CategorySeries' could be found (are you missing a using directive or an assembly reference?)
Hi, there has been a breaking API change in the latest version of the product. Please replace instances of XAxis and YAxis on CategorySeries with calls to the methods GetXAxis and GetYAxis
Is there any way to set the axis instead of get it for CategorySeries? Was this breaking change documented anywhere that I overlooked? I didn't see it in the published help files at this point.
On a whim I attempted to use "GetXAxis()" and "GetYAxis()" on a categoryseries in the sample provided above; but it informs me that the methods are marked internal (whereas X/YAxis properties are marked private). Is this expected behavior as well?
Hi,
Unfortunately my recollection betrayed me here. For a time those methods were accessible. But are internal in the release you are using. You will have to cast the category series as either HorizontalAnchoredCategorySeries, VerticalAnchoredCategorySeries, or HorizontalRangedCategorySeries, depending on which it is, and access the XAxis and YAxis that way. These changes were made to accomodate the bar series and other vertical category series to come.
-Graham
Thank you for the information. Since the documentation does not seem to yet reflect these changes that I can see; we have decided to wait until the next release to prevent any other issues from cropping up due to unmarked breaking changes.