Completed
Last Updated: 03 Jul 2019 11:22 by ADMIN
Release R3 2019 (LIB 2019.2.708)
ADMIN
Hristo
Created on: 22 May 2018 10:16
Category: ChartView
Type: Feature Request
1
FIX. RadChartView - the chart is not exported correctly to an image on a system with 125% scaling
The same issue can be observed in a DPI-aware application on higher scaling
Workaround: set the RadControl.EnableDpiScaling property to false

public partial class Form1 : Form
{
    public Form1()
    {
        RadControl.EnableDpiScaling = false;

        InitializeComponent();

        LineSeries lineSeries = new LineSeries();
        lineSeries.DataPoints.Add(new CategoricalDataPoint(20, "Jan"));
        lineSeries.DataPoints.Add(new CategoricalDataPoint(22, "Apr"));
        lineSeries.DataPoints.Add(new CategoricalDataPoint(12, "Jul"));
        lineSeries.DataPoints.Add(new CategoricalDataPoint(19, "Oct"));
        this.radChartView1.Series.Add(lineSeries);

        LineSeries lineSeries2 = new LineSeries();
        lineSeries2.DataPoints.Add(new CategoricalDataPoint(18, "Jan"));
        lineSeries2.DataPoints.Add(new CategoricalDataPoint(15, "Apr"));
        lineSeries2.DataPoints.Add(new CategoricalDataPoint(17, "Jul"));
        lineSeries2.DataPoints.Add(new CategoricalDataPoint(22, "Oct"));
        this.radChartView1.Series.Add(lineSeries2);
        
        LassoZoomController lassoZoomController = new LassoZoomController();
        radChartView1.Controllers.Add(lassoZoomController);
    }

    private void radButton1_Click(object sender, EventArgs e)
    {
        this.radChartView1.ExportToImage(@"..\..\image.png", this.radChartView1.Size);
    }
}
0 comments