xamarin ios vertical barchart with onclick event

marc 101 Reputation points
2020-12-14T21:47:34.767+00:00

I posted this question earlier,
https://learn.microsoft.com/en-us/answers/questions/187960/xamarin-ios-chart.html?childToView=188538#answer-188538

since xamarin on visual studio does not work for a week until now, I was not able to say thank you for the answer and mark it as done as now it is closed. But I do have an extended question on top of the original question. The chart is working fine, but I need the barchart to be horizontal. I did a search, but seems microchart does not have support for it as for Xamarin.IOS.

thanks!

Developer technologies | .NET | Xamarin
{count} votes

1 answer

Sort by: Most helpful
  1. marc 101 Reputation points
    2020-12-16T21:13:05.54+00:00

    thanks Jarvan

    now i tried out your code and it is working. Just need to add following to make it work

    1. the rotation needs to be 270 degree instead of 90, else it is upsidedown CGAffineTransform.MakeRotation(3.14159f * 270 / 180f)
    2. after the rotation, the char view frame needs to be re-positioned within the container view, so everything will look good. var chartView= new ChartView
      {
      Transform = CGAffineTransform.MakeRotation(3.14159f * 270 / 180f)
      }; chartView.Frame = new CGRect(0, 0, ContainerView.Frame.Width, 50);
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.