Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: How to create a chart with data from database

by Anonymous Monk
on Jan 12, 2013 at 08:56 UTC ( #1013017=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to create a chart with data from database
in thread How to create a chart with data from database

:D http://cpansearch.perl.org/src/JMCNAMARA/Spreadsheet-WriteExcel-2.38/examples/chart_bar.pl
###################################################################### +######### # # Example 2. A minimal chart with user specified categories (X axis) # and a series name. # my $chart2 = $workbook->add_chart( type => 'bar' ); # Configure the series. $chart2->add_series( categories => '=Sheet1!$A$2:$A$7', values => '=Sheet1!$B$2:$B$7', name => 'Test data series 1', );

Replies are listed 'Best First'.
Re^4: How to create a chart with data from database
by terrykhatri531 (Novice) on Jan 12, 2013 at 10:05 UTC

    The sample script defines data for the cahrt as under

    # Add the worksheet data that the charts will refer to. my $headings = [ 'Category', 'Values 1', 'Values 2' ]; my $data = [ [ 2, 3, 4, 5, 6, 7 ], [ 1, 4, 5, 2, 1, 5 ], [ 3, 6, 7, 5, 4, 3 ], ]; $worksheet->write( 'A1', $headings, $bold ); $worksheet->write( 'A2', $data );

    Question

    How do I map my data that is retrieved from the database to the chart ?

    Regards

    Terry

      The sample script defines data for the cahrt as under

      You already have data from database, there is no more mapping left

      How do I map my data that is retrieved from the database to the chart ?

      Do you have microsoft excel installed? Have you ever created a chart using microsoft excel? Have you read http://search.cpan.org/dist/Spreadsheet-WriteExcel/lib/Spreadsheet/WriteExcel.pm#Cell notation

      I suggest you drop what you're doing and create a chart using the GUI tools so you can see what is involved

      I don't have excel so I cant help

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013017]
help
Chatterbox?
[perldigious]: Or is my irritation/ frustration well founded?
[Corion]: perldigious: That seems to be more the export and likely it's the recipients of that export that like the titles changes
[Corion]: ... "changed"
[Corion]: I usually expect fixed header names, but am sometimes lenient in the order of columns. But changing the report titles often sounds to me as if you are not the sole consument of the export ;)
[shmem]: perldigious: as always - if it ain't broke, don't fix it. Ther must be a very compelling reason for changing column names in a database. Those are rare.
[Corion]: If you have whitespace in the column names in the database, whap the DBAs ;)

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-05-25 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?