[aida] Print CSS

Herbert König herbertkoenig at gmx.net
Wed Jun 17 06:53:19 CEST 2009


Hi Janko,

JM> By adding a cssPrint method which builds CSS dynamically instead of just
JM> returning the static text.

IMHO this can't work as the legend has a rectangle for every line
repeating that line's colour. And they all share the same class.

JM> Another way is inline CSS, using WebElement style: 'put a style
JM> definition here'

Yes but I need to put a print style there. Maybe I'm on the wrong path
as I actually don't know the difference between a print style and a
screen style. And how to set a pritnt style dynamically. Seems I have
to spend some time learning CSS.

To see the problem just print the line chart of the WebChartDemo to
see that the labels have no colour and are printed in a position
different from their screen position.

The latter is no problem to me because I need the labels outside.

This can be done with a slightly changed WebChartDemoApp>>lineChartElement.

lineChartElement
        | e c container|
        e := WebElement new.
        container := WebElement new.
        container registerId.
        e addTextH2: 'Line chart example'.
        c := WebChart new 
                addData: self observee data1 label: 'label 1';
                addData: self observee data2 label: 'label 2';
                addData: self observee data3 label: 'label 3'.
        c lines show: true;
                showShadow: true.
        c legend show: true.
        (c optionsAt: #legend) container: container id.
        e  add: container; addBreak.
        e newRow.
        e add: c.
        ^e

Just curious, do you not need to print WebCharts with legends or have
you solved that in a completely different way?

        
Thanks,

Herbert                            mailto:herbertkoenig at gmx.net



More information about the Aida mailing list