Jump to content

 

Photo

4.5.4.0 WPF Chart.Print() & Chart.Export() very buggy


  • Please log in to reply
9 replies to this topic

#1 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 04 April 2012 - 02:29 AM

I am using Visifire 4.5.4.0 for WPF with .NET 4.0. I have a chart as shown in attached screenshot.png.

When it is printed with Chart.Print(), on PAPER:

1. there are 3 series but only 2 are printed. The missing one is a horizontal line with 2 data points.
2. chart title is partially printed.
3. Y axis title is partially printed.
4. legend is partially printed.

I cannot send you the paper. I printed it to PDF file print.pdf and attached it. (In PDF file, the titles are fine.)

When the chart is exported with Chart.Export(), it is completely black outside plot area and legend. All titles and axis labels are invisible. Please see attached export.jpg.

Kevin

Attached Files



#2 Eva

Eva

    Advanced Member

  • Members
  • PipPipPip
  • 365 posts
  • Gender:Female

Posted 04 April 2012 - 05:40 AM

Hi,

When the chart is exported with Chart.Export(), it is completely black outside plot area and legend. All titles and axis labels are invisible.


I suggest you to set the Background="White" in Chart.
Regards,
Eva

#3 mac

mac

    Advanced Member

  • Members
  • PipPipPip
  • 171 posts
  • Gender:Male

Posted 04 April 2012 - 05:43 AM

When it is printed with Chart.Print(), on PAPER:

1. there are 3 series but only 2 are printed. The missing one is a horizontal line with 2 data points.
2. chart title is partially printed.
3. Y axis title is partially printed.
4. legend is partially printed.

We are trying to reproduce the issue here. We will get back to you soon.

When the chart is exported with Chart.Export(), it is completely black outside plot area and legend. All titles and axis labels are invisible.

Default background of Chart is Transparent. Try setting Background="White" in Chart.

#4 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 04 April 2012 - 08:12 PM

I downloaded 4.5.5.0 that says the printing bugs are fixed. I tested it. It fixed 2 of the 4 problems I reported and created a new one. The horizontal series is still missing and the legend is still clipped.

The new bug is that the chart, after printing, is moved to the lower right. It is covered by other elements at the bottom and clipped by the window on the right. The screen shots before and after printing are attached.

Kevin

Attached Files



#5 mac

mac

    Advanced Member

  • Members
  • PipPipPip
  • 171 posts
  • Gender:Male

Posted 05 April 2012 - 07:06 AM

We are able to reproduce the issues. Itís an issue with Printing DropShadowEffect in .Net Framework 4.0 WPF App. It works well in .Net 3.5.
This issue can be easily reproduced in a WPF 4.0 app without using Visifire.

-----------------------------------Test Case-------------------------------------

XAML

<Grid MouseLeftButtonUp="PrintMe_MouseLeftButtonUp" x:Name="PrintMe" Background="Red" Height="40">
     <Canvas Background="White" Width="344" Height="22">
         <TextBlock> asdadasd</TextBlock>
         <Canvas.Effect>
             <DropShadowEffect BlurRadius="4" Direction="315" RenderingBias="Performance" />
         </Canvas.Effect>
     </Canvas>
</Grid>

C#

private void PrintMe_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{   
     PrintDialog dialog = new PrintDialog();
     if (dialog.ShowDialog() != true)
     { return; }

     dialog.PrintVisual(PrintMe, "Test Print");
}
--------------------------------------------------------------------------------------

1. there are 3 series but only 2 are printed. The missing one is a horizontal line with 2 data points.
4. legend is partially printed.

So in this case I suggest you to set ShadowEnabled="False" in Legend, PlotArea, DataSeries.

Example:

<vc:Chart>

    <vc:Chart.PlotArea>
         <vc:PlotArea ShadowEnabled="False"></vc:PlotArea>
    </vc:Chart.PlotArea>
                
    <vc:Chart.Legends>
         <vc:Legend ShadowEnabled="False" HorizontalAlignment="Center"></vc:Legend>
    </vc:Chart.Legends>

</vc:Chart>

2. chart title is partially printed.
3. Y axis title is partially printed.

Please download the latest version 4.5.5.0 from here and let us know your feedback.

Regards,
Mac

#6 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 05 April 2012 - 10:24 PM

We are able to reproduce the issues. Itís an issue with Printing DropShadowEffect in .Net Framework 4.0 WPF App. It works well in .Net 3.5.
This issue can be easily reproduced in a WPF 4.0 app without using Visifire.

-----------------------------------Test Case-------------------------------------

XAML

<Grid MouseLeftButtonUp="PrintMe_MouseLeftButtonUp" x:Name="PrintMe" Background="Red" Height="40">
     <Canvas Background="White" Width="344" Height="22">
         <TextBlock> asdadasd</TextBlock>
         <Canvas.Effect>
             <DropShadowEffect BlurRadius="4" Direction="315" RenderingBias="Performance" />
         </Canvas.Effect>
     </Canvas>
</Grid>

C#

private void PrintMe_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{   
     PrintDialog dialog = new PrintDialog();
     if (dialog.ShowDialog() != true)
     { return; }

     dialog.PrintVisual(PrintMe, "Test Print");
}
--------------------------------------------------------------------------------------


Hi Mac,

Your sample code reproduces a different issue. When I tried your sample code, the canvas dropped on paper print out, but not on screen. What I reported in reply #4 is that Visifire chart drops on screen. The attachment in reply #4 are screen shots.

Kevin

#7 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 05 April 2012 - 11:00 PM

So in this case I suggest you to set ShadowEnabled="False" in Legend, PlotArea, DataSeries.


I did as suggested and the legend is printed fine. Thank you!

But the horizontal series is still not printed. Can you reproduce that horizontal series does not print?

Kevin

#8 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 05 April 2012 - 11:05 PM

Quote
2. chart title is partially printed.
3. Y axis title is partially printed.

Please download the latest version 4.5.5.0 from here and let us know your feedback.


As I wrote in my reply #4, I had already downloaded and tested 4.5.5.0. The chart and Y axis titles print fine.

#9 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 05 April 2012 - 11:18 PM

Hi Mac,

Your sample code reproduces a different issue. When I tried your sample code, the canvas dropped on paper print out, but not on screen. What I reported in reply #4 is that Visifire chart drops on screen. The attachment in reply #4 are screen shots.

Kevin


To clarify, the new issue found in 4.5.5.0, reported in my reply #4, is that Visifire chart drops on screen after print dialog is closed.

Also I probably misunderstood the purpose of your test case sample code. It is probably for my original issues instead of the new issue found in 4.5.5.0. Sorry!

Kevin

#10 beamer

beamer

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 05 April 2012 - 11:30 PM

Hi,

Quote
When the chart is exported with Chart.Export(), it is completely black outside plot area and legend. All titles and axis labels are invisible.

I suggest you to set the Background="White" in Chart.


Did as suggested and it works. Thanks!

Kevin




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users