We are testing your new great product with mono-touch. Is there any way to set the formatting of the numeric x axis label. Example with N0 or #,###,
If you implement IGChartViewDelegate you can override the chartView:labelForAxis:withItem: method to customize and format the text displayed for the axis labels.
Do you have some sample? If possible in monotouch, I really am missing samples using your controls with monotouch!
First you create a class that inherits from IGChartViewDelegate and override the ChartViewLabelForAxisWithItem method. It's important to note that the casting of the type of point changes depending on which chart type you are using.
class SampleChartDelegate : IGChartViewDelegate { public override NSString ChartViewLabelForAxisWithItem (IGChartView chartView, IGAxis axis, NSObject item) { if (axis.Key == "xAxis") { return new NSString(String.Format("Test {0}", ((IGCategoryPoint)item).Label)); } else return new NSString(((NSNumber)item).StringValue); } }
Then inside the class where you're using the IGChartView, set its Delegate property to an instance of the SampleChartDelegate class.
infraChart.Delegate = new SampleChartDelegate();
Thanks - helped a lot.
Hi,
I want to change the names of labels for X-Axis and Y-Axis for Line Series and Bar Series using IGChart framework.Could anyone please help in this regard.
Regards,
kaushik.
I believe your question has been answered in this thread:
http://www.infragistics.com/community/forums/p/75347/380668.aspx