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; }
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.
I am checking if this is still an issue for you after Graham's advises.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics
www.infragistics.com/support
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
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, 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