Thanks for helping. I had many problems but now it works. Messing up with multidimensional arrays etc..
But still I have question. Is it possible to rotate chart before printing? because I have multipage printing and allmost all pages are portrait but i want to rotate barchart so barchart is landscape. I try to use mx:rotate and set duration to 1 but I think its too long. if I set duration to 0 nothing happen. Any idea? --- In flexcoders@yahoogroups.com, "Mark" <[EMAIL PROTECTED]> wrote: > > 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 flexcoders@yahoogroups.com, "monkeeeh" <monkeeeh@> 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; > > } > > >