SWATH graphs

20 views
Skip to first unread message

Salo

unread,
May 25, 2009, 10:58:29 AM5/25/09
to Entrance
Hi,

Do you know of any problem when generating graphs with multiple (say
more than 10) swaths?
I am using db entrance to plot multiple lines in a swathchart and use
swaths to show errors (some kind of error bars).
I haven't actually found a way to plot multiple lines in a chart and
have error bars as well for all of them, so I am using swaths to show
the errors for each line.
Everything runs smooth and I get the desired output for up to 5 lines
and error representation using swaths, but from that point onward
things fail.

I am posting part of the script that I am using - maybe someone had
the same problem and has a solution to it - or maybe this is a
limitation of the software?

PLOT swathchart
xlabels,

BIG FILLED SKYBLUE TRIANGLE and line,
RGBA(255,255,255,0) SWATH,
very transparent very light SKYBLUE swath,

BIG FILLED CHAMELEON BOX and line,
RGBA(255,255,255,0) SWATH,
very transparent very light CHAMELEON swath,

BIG FILLED SCARLETRED CIRCLE and line,
RGBA(255,255,255,0) SWATH,
very transparent very light SCARLETRED swath,

BIG FILLED YELLOW TRIANGLE and line,
RGBA(255,255,255,0) SWATH,
very transparent very light YELLOW swath,

BIG FILLED BLACK BOX and line,
RGBA(255,255,255,0) SWATH,
very transparent very light BLACK swath,

BIG FILLED ORANGE CIRCLE and line,
RGBA(255,255,255,0) SWATH,
very transparent very light ORANGE swath,

BIG FILLED PURPLE TRIANGLE and line,
RGBA(255,255,255,0) SWATH,
very transparent very light PURPLE swath,

BIG FILLED GRAY BOX and line,
RGBA(255,255,255,0) SWATH,
very transparent very light GRAY swath
WITH
NOTE LEFT "This is a note on the left side"
FONT "sanserif" plain 13
LEGEND
GRIDLINES
TITLE CENTER "Title"
TITLE Y "Measured value"
TITLE X "Changed value"
PAGE 0 0 1200 600

select
value_x,v1,v1min,v1max,v2,v2min,v2max,v3,v3min,v3max,v4,v4min,v4max,v5,v5min,v5max,v6,v6min,v6max,v7,v7min,v7max,v8,v8min,v8max
FROM
......................... rest of the sql code goes here

Remarks:
(1) the sql statement returns the correct values (checked as output in
dbentrace as tabular report)
(2) the lines and swaths look ok up to (v5,v5min,v5max) inclusively
(3) changing the order of the values-lines matching still yields only
first 5 lines being plotted correctly (so i see no problem with the
definition of the chart lines/swaths)

Tod Landis

unread,
May 25, 2009, 1:42:16 PM5/25/09
to dbent...@googlegroups.com
Hi Salo,
The current version supports 16 colors, and each swath
you define, even the transparent ones, uses up one color slot.

If you are able to build Entrance, you can change the number of
available colors by editing these lines in the Chart class constructor:

// up to 16 different series colors allowed.
columnColors = new Color[] { // uses the color defaults,
which user can change
null,null,null,null,
null,null,null,null,
null,null,null,null,
null,null,null,null};

This array is used by Chart.getColumnColor() to supply the column
colors. You can lengthen it by adding more nulls.

I can also add more colors for you in the next dot-dot release, which
is about
a week away. Let us know how many you need.
- Tod
Tod Landis
dbEntrance Software
PO Box 2383
Boulder Creek CA 95006
831.338.6967
t...@dbentrance.com
http://dbentrance.com/






Salo

unread,
May 26, 2009, 5:28:02 AM5/26/09
to Entrance
Hi,

Thanks for the reply!
I can build entrance so I will change the number of available colours.
If there were no other requests for such a feature I see no point in
changing the number of supported colours in the next release.

Thank you again for your help!

- Salo
Reply all
Reply to author
Forward
0 new messages