Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1735
XamChart equivalent of UltraChart support to display a custom image?
posted

I am looking at some of our legacy applications. The Winforms UltraChart has a feature that allow users provide a Bitmap for the Chart to display.

You implement the ILayer interface and add them to the UltraChart Layers list.

Then the UltraChart during the Paint event calls the FillSceneGraph method of its layers passing an SceneGraph object.

Then the Implementation of the ILayer can create a ChartImage and add it to the given SceneGraph, from a System.Drawing.Image (which can be a Bitmap) and a rectangle representing the bounds to be plotted.

This allowed to fully customize what the chart displays using a Bitmap.

Is there an equivalent of this mechanism where I could use an Image in the XamChart?

Thank you!

Parents
No Data
Reply
  • 29105
    Suggested Answer
    Offline posted

    Hello Dzyann,

    The XamChart has been retired for a few years now and was replaced with the XamDataChart. By setting it's PlotAreaBackgroundContent property to an Image of your choice you can show your image in a matter of seconds:

    eg.

     string _settings = Directory.GetCurrentDirectory() + @"\yourimage.jpg";
     
                Image simpleImage = new Image();
               
                simpleImage.Source = new BitmapImage(new Uri(_settings));
               
                this.xamDataChart.PlotAreaBackgroundContent = simpleImage;

    For more details regarding the retirement of the XamChart please visit our community blog.

    Let me know if you have any questions.

Children