JDK-8126102 : PieChart snapshot renders incorrectly
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 7u6
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2012-06-15
  • Updated: 2015-06-17
  • Resolved: 2013-09-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Relates :  
Description
If I take a snapshot of a piechart, the labels of the pie slices are shown, but the colored slices are not.

Attached is a sample test case (PieChartExport.java), which captures a snapshot image then renders it - the rendered image should look like a PieChart, but it does not.  Sample output of the test case is also attached (missingslices.PNG).
Comments
I agree that this issue can be resolved now.
14-09-2013

Documentation regarding interaction of snapshots and scene attachment as well as snapshots of animated nodes such as charts was added to the snapshot 2.2 API docs (http://docs.oracle.com/javafx/2/api/javafx/scene/Node.html#snapshot%28javafx.scene.SnapshotParameters,%20javafx.scene.image.WritableImage%29). I think this issue can be closed, or is some other change still intended here?
23-08-2013

As part of finishing the API docs for snapshot, this limitation will be documented.
15-06-2012

This is a known limitation in CSS and layout processing. In order for either to work correctly for Node.snapshot(), the node in question must be attached to a Scene. The scene need not be attached to a Stage, so the following is sufficient, added any time after the chartContainer is constructed and before snapshot is called: Scene snapshotScene = new Scene(chartContainer);
15-06-2012