[reportlab-users] legends and backgrounds

Dirk Datzert reportlab-users@reportlab.com
Fri, 02 Aug 2002 11:20:00 +0200


Hi Robin,

Robin Becker schrieb:
> 
> well if we go on like this it would seem that all things will end up
> with a background option and an additional step will be required in the
> draw method. So before we go rushing off what other things could have a
> background? 

You are right. I'm just a replortlab newbie :-)

Lets make checklist for that ! Everybody should comment :) Is this a
MiniWiki now :) ?

classes from reportlab/graphics/charts:

o PlotArea(Widget) ! is it's own background :)

o CategoryAxis(Widget) ?

o ValueAxis(Widget) ?

o BarChart(PlotArea) ! has one :)

o Legend(Widget) ?

o LineChart(PlotArea) ! has one :)

o LinePlot(PlotArea) ! has one :)

o GridPlot(PlotArea) ! has one :)

o ScatterPlot(PlotArea) ! has one :)

o markers ? No, I don't really think that !

o Pie(Widget) ? why not ? I think this should be configurable to be
wider/higher than the pie !

o LegendedPie(Pie) ? same as Pie.

o Label(Widget) ? they have box...-attributes, which are a kind of
background 

o LabelDecorator ? don't see the difference between Label and
LabelDecorator

o BarChartLabel(Label) ? same as Label

o NA_Label(BarChartLabel) ? same as Label

classes from other places ?

Probably every class based on Widget in reportlab/graphics/charts is a
candidate for background ?

> Also is the current PlotArea sufficient/right? It won't cope

For Pies it would be neccessary to have other dimensions since the pie
is in the center of the background.
The background must overlap the Pie.

> with the case when the object already has strokeColor/fillColor for
> other reasons. The Label object has boxFillColor, boxStrokeColor,
> boxStrokeWidth etc to handle filling of the background.

That's a question of your software philosophy :-) Two way's to handle
the same 'background' ?

> to determine the contents of a Group/Drawing. If the instance has
> something called a background then that thing is returned first as part

Are coming all backgrounds before any other foreground drawing ?

> of the contents. Unfortunately since groups don't have a size it's hard
> to allow the getContents thing to automatically configure the
> background. 

The size must be set based on the content-object ?

Regards,
Dirk