I'm trying to set custom view tick mark in my X axis. According to the documentation, I implemented the following method to get rid of.
- (void)sChart:(ShinobiChart *)chart alterTickMark:(SChartTickMark *)tickMark beforeAddingToAxis:(SChartAxis *)axis
While it's possible to find some examples in Objective-C (people say that they work), in MT I cannot do the same.
This is the code I'm using.
protected override void OnAddingTickMark (ShinobiChart chart, SChartTickMark tickMark, SChartAxis axis)
UILabel tickMarkLabel = new UILabel (new RectangleF (tickMark.TickMarkX - 25, tickMark.TickMarkY, 50, 50));
UIImageView logoImageView = new UIImageView (UIImage.FromBundle("Images/CustomImage.png"));
logoImageView.Frame = tickMarkLabel.Bounds;
tickMark.TickLabel = tickMarkLabel;
In this I'm able to insert an image in
TickLabelproperty. In this case my doubt is the following. Why do I need to create a label first and then assign it to that property?
The same hack achieved like the following does not work.
UIImageView logoImageView = new UIImageView(UIImage.FromBundle("Images/CustomImage.png"));
logoImageView.Frame = new RectangleF (tickMark.TickMarkX - 25, tickMark.TickMarkY, 50, 50));
tickMark.TickMarkView = logoImageView;
The mark view is not displayed. Any suggestion? Is it possible to follow a more clean approach?
Thank you in advance.