legend and with (to big) / how to adjust?

1,917 views
Skip to first unread message

The Brn

unread,
Jul 19, 2011, 4:10:26 AM7/19/11
to jqplot-users
Hi,

I'm using the legends in jqPlot. But there are looking oversizes.
http://www.imagebanana.com/view/edf1z0bx/legend.JPG

Any idea, how to change the maximum width?

It looks like, the width of the legend is equal the width of the
parent div.:

<div id="chartdiv" style="height:300px;width:600px;
position:relative;"></div>

But width:600px is mandatory to get an chart with an width of 600px.

Thank you!

Jonathan Watts

unread,
Jul 19, 2011, 9:47:18 AM7/19/11
to jqplot...@googlegroups.com
I'd take a look in jquery.jqplot.css.

Chris Leonello

unread,
Jul 19, 2011, 9:48:26 AM7/19/11
to jqplot...@googlegroups.com
It looks like you have a css declaration on your page that applies large width to all tables (e.g. "90%").  You should remove the global declaration if present.

Legends are displayed in a table with the class "jqplot-table-legend".  The rows and cells also have the same class.  You can adjust the legend css using that class.

-- 
Chris Leonello
http://www.jqplot.com
--
You received this message because you are subscribed to the Google Groups "jqplot-users" group.
To post to this group, send email to jqplot...@googlegroups.com.
To unsubscribe from this group, send email to jqplot-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jqplot-users?hl=en.

The Brn

unread,
Jul 20, 2011, 3:27:59 AM7/20/11
to jqplot-users
>You should remove the global declaration if present.


Oh yeah.. you are absolutely right.

An CSS file for cooperate design is loaded in an early state of this
application. I had nothing todo with this CSS file before. This file
includes an width:100% for all tables, which is needed for design
reason.
So i changed the class "jqplot-table-legend" and set width:1px. Now,
the legend table has the right width.

Thank you! :-)
Reply all
Reply to author
Forward
0 new messages