DBIx::Chart "real" Candlestick



Hello

Do anybody know how to draw a real candlesick bar chart with open,
high, low, close instead of high and low?
A "real" candlestick = http://tinyurl.com/3yayg7
DBD::Chart candlestick = http://www.presicient.com/dbdchart/dbdchart_frame.html#candlestick

Maybe I can combine 2 kind of charts to make it look like a real
candlestick?

Thanks for Help!

Christian Maier

PS testable sample code snipped (looks a bit wired yet cause of open,
high, low and close):
#!/usr/bin/perl

use DBI;

$dbh = DBI->connect('dbi:Chart:', undef, undef);

# multrange 3D barchart with imagemap
#

my @date = ("2007-01-01", "2007-01-02");
my @open = (10, 13);
my @high = (12, 13);
my @low = (9, 10);
my @close= (11, 12);

$dbh->do('CREATE TABLE candletest (datum date, o integer, h integer, l
integer, c integer)');
$sth = $dbh->prepare('INSERT INTO candletest VALUES(?, ?, ?, ?, ?)');

$sth->execute($date[0], $open[0], $high[0], $low[0], $close[0]);
$sth->execute($date[1], $open[1], $high[1], $low[1], $close[1]);

$sth = $dbh->prepare("SELECT candlestick from candletest
WHERE WIDTH=400 AND HEIGHT=400 AND
title = 'Sample THREE_D Bar Chart' AND
signature = 'Copyright(C) 2001, Presicient Corp.' AND
X_AXIS = 'datum' AND
Y_AXIS = 'high' AND
SHAPE='fillsquare' AND
SHOWGRID = 1 AND
COLORS=(red, blue) AND
SHOWVALUES=1 AND
MAPNAME = 'candlesample' AND
mapURL = 'http://www.presicient.com/samplemap.pl'"
);

$sth->execute;
$row = $sth->fetchrow_arrayref;

open(BAR, '>samp3dbar5.png');
binmode BAR;
print BAR $$row[0];
close BAR;
$dbh->do('DROP table candletest');
print "Candlestick Chart OK\n";

.



Relevant Pages

  • Re: can i do this type of stacking column chart? (and how?)
    ... money spent by each company, graphed against the value scale of money ... show the bar you want. ... Now create your bar chart, then select one of the bars, Format Selected ... then set the Overlap value to 100%. ...
    (microsoft.public.excel.charting)
  • Re: Access/Microsoft Graph - Possible to control category colors v
    ... bar) via code, ... > be applied with some modification to your Access graph. ... >> I have a table containing error codes. ... >> While I haven't had any problem creating the bar chart, ...
    (microsoft.public.access.reports)
  • Re: Bar chart turns to vertical lines
    ... Thank you Jon. ... Otherwise, each bar is 1/365 of the year wide, ... I have a simple spreadsheet showing my utility bills for each month. ... automatically returns to a bar chart. ...
    (microsoft.public.excel.misc)
  • Re: Bar chart turns to vertical lines
    ... Some folks prefer bottom-posting. ... I have a simple spreadsheet showing my utility bills for each month. ... bars changed to single pixel vertical lines of the same height that the bar ... automatically returns to a bar chart. ...
    (microsoft.public.excel.misc)
  • Re: floating bar chart datasheet manipulation
    ... if you use a stacked bar chart, you'll be able to put in the data you need. ... but rather where I specify along the x-axis. ... > floating bar chart allows this, but I want to continue to add data to the ...
    (microsoft.public.powerpoint)