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
125
Bug in PDF export
posted

There seems to be an issue with exporting area charts with transparencies to PDF. Here is what my chart looks like on screen:

 

 

And here is what it looks like in the resulting PDF:

 

 

Here is my export code:

 

 

 

 

 

 

 

 

 

 

public static void ExportToPdf(this UltraChart chart, string path) {

 

 

var report = new Report();

 

 

var section = report.AddSection();

section.PageSize =

new PageSize(Converter.MillimetersToPoints(210), Converter.MillimetersToPoints(297));

section.PageOrientation =

PageOrientation.Landscape;

 

 

using (var graphics = section.AddCanvas().CreateGraphics()) {

chart.RenderPdfFriendlyGraphics(graphics, chart.Width, (

int)Math.Round(chart.Width * (210.0 / 297.0)));

report.Publish(path,

FileFormat.PDF);

And the PaintElement I am adding to the NumericTimeSeries (This is a composite chart - layer type AreaChart)

 

var paintElement = new PaintElement();

paintElement.ElementType =

PaintElementType.Gradient;

paintElement.FillGradientStyle =

GradientStyle.Vertical;

paintElement.FillStopOpacity = 0;

paintElement.FillOpacity = 167;

Parents
  • 125
    Offline posted

    This is a bug - Each series is rendered opaque in the resulting PDF.

    Closest thing to a workaround is adding series to the chart in order of peak value.

    Bug is still present in service release 2119

Reply Children
No Data