Latest Chart release 2.5.6 not working with Xamarin


#1

Release 2.5.3 was working just perfekt - but with the 2.5.6 some properties has changes and can not be used.

FlavourColors has changed to a NSMutableArray and when used the control fails with

“Method not found” ShinibiCharts.SChartDonutSeriesStyle.set_FlavourColors.

Axis.Categories also changed to NSMutableArray

Same issue  with Legend.Style.TextAlignment can’t be changed.

Any solutions? 


#2

Hi TheCalvin,

I had no issues with what you described when I tested using 2.5.6. Here is what I did:

FlavourColors

I managed to set my FlavourColors array with the following code:

NSMutableArray colorArray = new NSMutableArray ();
			colorArray.AddObjects(new UIColor[3] { UIColor.Red, UIColor.Green, UIColor.Blue });
			series.Style.FlavourColors = colorArray;

Categories

I used the following bit of code to access my charts categories and had no issues (the following line was called in OnRenderFinished):

NSMutableArray cats = ((SChartCategoryAxis)chart.XAxis).Categories;

Text Alignment

I managed to change my legend’s text alignment with the following:

// Monotouch hasn't bound NSTextAlignment yet, so you'll need to get the int value from the iOS NSTextAlignment documentation.
// Left
chart.Legend.Style.TextAlignment = 0;
// Center
chart.Legend.Style.TextAlignment = 1;

We changed FlavourColors to a UIColor[] but changed it back to NSMutableArray as the native side uses an NSMutableArray and MonoTouch can’t convert between the two (Categories was also changed for the same reason). I couldn’t replicate any crashes or issues. Could you perhaps provide some of the code you are using relevent to those properties? Could you also verify that you are using 2.5.6 by adding the following code to your project somewhere and checking the Application Output:

System.Diagnostics.Debug.Write (ShinobiChart.Info);

Thanks,
Jan


#3

I’m getting these messages and I don’t know why. Thanks, Mike Rutherford.

warning CS1607: Referenced assembly ShinobiCharts' has different culture setting ofen’

warning CS1607: Referenced assembly ShinobiGrids' has different culture setting ofen’


#4

I see these too, both in 2.5.5 and the latest 2.5.6.

Lars


#5

Hi Mike,

This was a small mistake in our AssemblyInfo.cs, it has been fixed in our next release.

Lars - can I ask exactly which issue you are referring to here? :slight_smile:

Thanks,
Jan


#6

Hi Jan,

Ah sorry, I am referring to:

warning CS1607: Referenced assembly ShinobiGrids' has different culture setting ofen’

Regards
Lars