Print CSS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Print CSS

Herbert König
Hi,

I got WebTabs print better (some fiddling still needed) by copying the css..
methods to cssPrint.. methods. I love Aida's naming conventions!

The legends of a WebChart (at least if printed outside the chart) seem
to use a JS generated screen css to set the colour. They print without
colour.

The screen css seems generated in WebStyle>>protoChartJs after
legendColorBox.

So how do I generate the print css dynamically? And wouldn't that be a
bug to report to the protoChart people?

Thanks,

Herbert                          mailto:[hidden email]

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Print CSS

Janko Mivšek
Hi Herbert.

Herbert König pravi:

> I got WebTabs print better (some fiddling still needed) by copying the css..
> methods to cssPrint.. methods. I love Aida's naming conventions!

Nice to hear that :)

> The legends of a WebChart (at least if printed outside the chart) seem
> to use a JS generated screen css to set the colour. They print without
> colour.
>
> The screen css seems generated in WebStyle>>protoChartJs after
> legendColorBox.

> So how do I generate the print css dynamically? And wouldn't that be a
> bug to report to the protoChart people?

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

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

But I don't know id this can help in your case ...

Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Print CSS

Herbert König
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:[hidden email]

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida