3 Answers, 1 is accepted
0
Accepted
Hello Mariia,
Can you share a bit more information on your scenario? Some runnable code showing the chart's setup and exporting code would be helpful.
Also, keep in mind that the reported behavior could be observed if you try to export the chart when its hidden or not added in the visual tree. This happens because the labels are not generated until the chart becomes visible. In this case you can consider opening a new window with the chart and exporting it after this. Here is a small code example showing this approach. Can you please give it a try and let me know how it goes?
Regards,
Martin Ivanov
Progress Telerik
Can you share a bit more information on your scenario? Some runnable code showing the chart's setup and exporting code would be helpful.
Also, keep in mind that the reported behavior could be observed if you try to export the chart when its hidden or not added in the visual tree. This happens because the labels are not generated until the chart becomes visible. In this case you can consider opening a new window with the chart and exporting it after this. Here is a small code example showing this approach. Can you please give it a try and let me know how it goes?
var chart =
new
RadCartesianChart3D();
chart.Width = 1000;
chart.Height = 600;
// some chart settings and populating with series and data here
var w =
new
Window();
w.WindowStyle = WindowStyle.None;
w.Height = 0;
w.Width = 0;
w.Content = chart;
w.Loaded += (s, e) =>
{
using
(Stream stream =
new
FileStream(
"../../test.png"
, FileMode.Create))
{
Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(
chart, stream,
new
System.Windows.Media.Imaging.PngBitmapEncoder());
}
w.Close();
};
w.Show();
Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0

Mariia
Top achievements
Rank 1
answered on 18 Apr 2018, 07:57 AM
Thank you very much. It has helped me!
However, opening windows with charts takes a lot of time. I need to display 3 RadCartesianChart3Ds from RadTabControl in the Report. To do this, I first export them to image, then save them to dbml, and then display them in a report. No idea how to speed up this process?
0
Hello Mariia,
I am afraid that at this point I cannot suggest you an alternative solution that would help you to boost the process. However, I logged an item in our internal backlog for altering the chart's logic so that the labels can be also exported when the chart is not added in the visual tree. I also updated your Telerik points.
Regards,
Martin Ivanov
Progress Telerik
I am afraid that at this point I cannot suggest you an alternative solution that would help you to boost the process. However, I logged an item in our internal backlog for altering the chart's logic so that the labels can be also exported when the chart is not added in the visual tree. I also updated your Telerik points.
Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.