0

Is there a working example for drawing an image inside a steema teechart in xamarin forms? I am really struggling with this.

1 Answer 1

1

It doesn't work either assigning an image to the back wall or panel:

  var backImage = new Image();
  backImage.Source = ImageSource.FromUri(new Uri("http://www.steema.com/uploads/news/xamarinforms_280x210.png"));

  tChart1.Walls.Back.Gradient.Visible = false;
  tChart1.Walls.Back.Image = backImage;

  tChart1.Panel.Gradient.Visible = false;
  tChart1.Panel.Image = backImage;

nor drawing it directly on the canvas:

void tChart1_BeforeDrawSeries(object sender, Graphics3D g)
{
  Rectangle chartRect = tChart1.Chart.ChartRect;
  var backImage = new Image();
  backImage.Source = ImageSource.FromUri(new Uri("http://www.steema.com/uploads/news/xamarinforms_280x210.png"));

  g.Draw(chartRect, chartRect, backImage, false);
}

So I have added this to the bug list (bug 1299). Happens both in iOS and Android.

3
  • Any idea when will this get fixed? :) Commented Sep 28, 2015 at 6:50
  • @IliaStoilov I'm working on it, I'll keep you posted. You may also be interested in signing up at bugzilla and add yourself to the CC list to be notified about status updates. Commented Sep 30, 2015 at 13:11
  • @IliaStoilov got this working in Android 4. Looks like there's a problem with Android 5 converting Xamarin.Forms.Image to Android.Graphics.Bitmap to be drawn to the canvas. I'll continue investigating. Commented Oct 7, 2015 at 9:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.