JQPlot图例外的图例 [英] JQPlot Legend outside of graph

查看:192
本文介绍了JQPlot图例外的图例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用JQPlot,并且在一个HTML页面上有很多图形。每个图表都有相同的图例。

I am using JQPlot and I have many graphs on one HTML page. Each of the graphs has the same legend.

我的问题是这样的:是否有可能在图表的外部显示图例,并且在HTML页面或自己的div中拥有自己的位置?

My question is this: Is it possible to display a legend totally outside of the graph with its own position on the HTML page or in its own div?

推荐答案

legend:{ 
                show:true,
                    renderer: $.jqplot.EnhancedLegendRenderer,
                    location: 's' ,
                    placement : "outside",
                    marginTop : "30px",
                    rendererOptions: {
                        numberRows: 1
                    }
                 },

您可以像上面的代码一样使用placement:outside 。你可以使用marginTop,marginBottom,marginRight,marginLeft属性来移动它。

You can use placement : "outside" like in the above code. And you can move it using marginTop,marginBottom,marginRight,marginLeft properties.

这篇关于JQPlot图例外的图例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆