Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legend colors do not print #124

Closed
dnschnur opened this issue Sep 28, 2012 · 3 comments
Closed

Legend colors do not print #124

dnschnur opened this issue Sep 28, 2012 · 3 comments

Comments

@dnschnur
Copy link
Member

Original author: knob...@gmail.com (June 10, 2008 15:29:19)

What steps will reproduce the problem?

  1. Create a chart with legends
  2. Print it (or use print preview)

What is the expected output? What do you see instead?
I expected to see the colored boxes that correspond to the trace colors.
Instead the legend label boxes are white.

What version of the product are you using? On what operating system?

  • Flot 0.4.
  • Firefox 3.0rc1, IE 6, IE 7 (on Win XP)
  • Firefox 2.0.0.11 (on Linux)

Please provide any additional information below.
Unfortunately the background colors set with CSS don't print (unless the
user overrides a setting on their browsers).
I think you have to either make the legend labels be canvas tags or use the
colored border cheat. In the example below, the top div is the same as
your legends, the bottom one uses the margin color trick to make printable
blocks:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>

<ul>

<li> <div style="overflow: hidden; width: 14px; height: 10px;
background-color: rgb(175, 216, 248);"/> </li>

<li> <p><div style="overflow: hidden; width: 0px; height: 0px;
border-width: 5px 7px 5px 7px; border-style: solid; border-color: rgb(175,
216, 248);"/></li>

</ul>

</body>
</html>

Original issue: http://code.google.com/p/flot/issues/detail?id=45

@dnschnur
Copy link
Member Author

From CrystalR...@gmail.com on June 28, 2008 02:26:41
I use the margin color cheat. Perhaps not the most glamorous thing in the world, but
it works.

@dnschnur
Copy link
Member Author

From olau%iol...@gtempaccount.com on September 08, 2008 09:42:52
This to a certain extent sounds like issue #25. If I recall correctly, I didn't have
any luck with it last time I experimented with it (I didn't have much time, though).

Anyone of you clever people up for well-tested patch I can apply?

@dnschnur
Copy link
Member Author

From olau%iol...@gtempaccount.com on November 03, 2008 14:16:47
I have just committed a fix using the border trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant