- George Roberts
http://gr5.org
--------------------------------------------------
From: "Fabien M�nager" <fabien....@gmail.com>
Sent: Thursday, August 19, 2010 6:40 PM
To: "Flotr Javascript Plotting Library" <fl...@googlegroups.com>
Subject: Re: How to set enhanced resolution for print
> --
> You received this message because you are subscribed to the Google Groups
> "Flotr Javascript Plotting Library" group.
> To post to this group, send email to fl...@googlegroups.com.
> To unsubscribe from this group, send email to
> flotr+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/flotr?hl=en.
>
>
I think you want to change above to this but I've never used the @media
thing so I'm not sure:
@media screen {
.print {display: none;}
.screen {display: block;} // added to make plot visible after printing is
done
}
@media print {
.screen {display: none;}
.print {display: block;} // added to make print div show up
}
>How do I add the class name later on?
You are all set - you put it in the div. You could add a class name later
on but don't need to. A gui component such as a div can only have one id
but many classes:
document.getElementFromId('print').class="print";
or the jquery method is something like (not checking manual):
$("#print").addClass('print');
It's a little confusing to have the id and class both called the same thing
so in the future I recommend putting "id" before all your ids such as:
<div id="idPrint"></div>
Simply to make the code more readable and searchable.
- George Roberts
http://gr5.org
--------------------------------------------------
From: "Peer" <peer.g...@gmail.com>
Sent: Saturday, August 21, 2010 5:11 AM
To: "Flotr Javascript Plotting Library" <fl...@googlegroups.com>
Subject: Re: How to set enhanced resolution for print
> Thank you for your tips.
> But I think I do not fully understand what to do. What does it mean
> "without a specific class name for now" and "When the second is drawn,
So - people have found ways to fool flotr. There is discussion *somewhere*
about this on the flot mailing list (not the flotr list). People have found
solutions. I don't know what they are but I seem to remember mention of
iframes. I think there are 3 solutions that should all work but maybe not.
They are:
1) <div> offscreen
2) <div> in tiny iframe
3) make div visible when calling flotr but when drawing complete set
visibility:none so that the user *never* sees it.
A fourth solution is to have a print button or print link that redraws the
graph in higher resolution, and then launches the browser's print dialog.
Similar to what maps.google.com does.
- George Roberts
http://gr5.org
--------------------------------------------------
From: "Peer" <peer.g...@gmail.com>
Sent: Tuesday, August 24, 2010 1:07 PM
To: "Flotr Javascript Plotting Library" <fl...@googlegroups.com>
Subject: Re: How to set enhanced resolution for print
> Sorry, but I can't get it to work. I tried everything I can think