Looks like you may be sending it too soon. Here's my code for a
barChart that should work for a pie as well. Try reacranging the
code a bit and see what happens. Let us know how it goes.
Mark
public function printSnapshotArea():void {
var printDJob:FlexPrintJob = new FlexPrintJob();
printDJob.printAsBitmap = false;
//
if (printDJob.start()) {
var printSnapViewArea:PrintViewSnapshotByArea = new
PrintViewSnapshotByArea();
addChild(printSnapViewArea);
printSnapViewArea.width=printDJob.pageWidth;
//
printSnapViewArea.printChart.dataProvider =
snapHolder.snapViewArea.dataProvider;
//
printDJob.addObject(printSnapViewArea);
removeChild(printSnapViewArea);
}
printDJob.send();
}
--- In [email protected], "monkeeeh" <[EMAIL PROTECTED]> wrote:
>
> Hi everyone!
> I have problem again.
> Im trying to print piechart.
> I have custom component (yhteenvetoPrintView) where i have pie
chart.
> If i add dataprovider from other piechart i dont see piechart. But
if
> i create static data to yhteenvetoPrintView i can see pie.
>
> Is printing too fast that piechart dont have time to get data or
> something like that.
>
> Please help!
>
> This is what how I try to print:
>
> var printJob:FlexPrintJob = new FlexPrintJob();
>
> if(printJob.start()) {
>
>
> var yhteenveto:yhteenvetoPrintView = new yhteenvetoPrintView
();
>
> addChild(yhteenveto);
> yhteenveto.saatavuusPie.dataProvider =
> toimVarmuusPie.dataProvider;
>
> printJob.addObject(yhteenveto);
>
> printJob.send();
>
> removeChild(yhteenveto);
>
> }else{
> return;
> }
>