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!
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.
Hi Michael,
I am so, sorry, I didn't know there was a XamChart and XamDataChart. I am talking about the XamDataChart. We are not using the XamChart.
Could we get this question migrated to the correct forum? And also, my question was referring to the XamDataChart, I am really sorry, could you help us on how to achieve this with the XamDataChart?
Looking at the Infragistics Samples, I found the CustomSeries Example. Implementing our own series, we could completely customize what gets rendered.
public class MySeries : Series {
protected override void RenderSeriesOverride(bool animate)
{
//Here Custom Rendering Code
Kind regards,