Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^19: Unable to create a Pivot chart with visiable Columns

by chandantul (Scribe)
on Sep 12, 2018 at 17:56 UTC ( #1222245=note: print w/replies, xml ) Need Help??


in reply to Re^18: Unable to create a Pivot chart with visiable Columns
in thread Unable to create a Pivot chart with visiable Columns

Thanks for your quick responses. Device keys are still coming with the Chart and this should be like below Browser1 Browser 2 Browser 3 Computer but its coming that not is required. Please check below Computer Browser1 Browser2 Browser3 Computer How I can remove that? but its required in the Chart table.

  • Comment on Re^19: Unable to create a Pivot chart with visiable Columns

Replies are listed 'Best First'.
Re^20: Unable to create a Pivot chart with visiable Columns
by marto (Cardinal) on Sep 12, 2018 at 18:02 UTC

      Yes ..you are correct! Thanks for your patients ..Would it be possible to get answer on my last question?

        I tend to think of poj as more of a doctor than a patient.

Re^20: Unable to create a Pivot chart with visiable Columns
by poj (Abbot) on Sep 12, 2018 at 20:32 UTC

    Are you saying you want the device totals in the pivot table but not plotted on the chart. That would mean having non-contiguous ranges like this

    $chart->add_series( categories => '=(Sheet1!$A$1:$A$9,Sheet1!$A$14:$A$25)', values => '=(Sheet1!$B$1:$B$9,Sheet1!$B$14:$B$25)', );

    and that would be complicated. It would also require version 0.76 or above of Excel::Writer::XLSX which I don't have. It would be simpler to create a separate table without device totals for the chart.

    poj

      In my Case D is the Device data but having more than 1200 rows and E is Browser data having more than 1200 rows. Please check below code snippet. and suggest if this can be appropriate in my Case?

      my $chart = $workbook1->add_chart( type => 'column', embedded => 1 ); $chart->set_size( width => 1000, height => 500 ); #my $col = 'B'; $col2 = 0; for my $app (sort keys %app){ ++$col2; # $chart->add_series( # name => $app, # categories => ['Summary',1,$row2,0,0], # values => ['Summary',1,$row2,$col2,$col2] # ); $chart->add_series( categories => '=(Data!$D$1:$D$9,Data!$D$14:$D$25)', values => '=(Data!$E$1:$E$9,Data!$E$14:$E$25)', ); } $chart->set_title ( name => 'Results of sample analysis' ); $chart->set_x_axis( name => 'Device/Browser' ); $chart->set_y_axis( name => 'User Count' ); # add chart $worksheet2->insert_chart( 26, 1 , $chart); $row2 = 48; $col2 = 4; my $width = 3; for my $device (@device){ my $text = $workbook1->add_shape( type => 'rect', text => $device, l +ine=>1, bold => 1 ); $worksheet2->insert_shape( $row2, $col2, $text ); $col2 += $width; } $workbook1->close();

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1222245]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-08-17 05:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?