Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
幅の異なる線のグループがあります。凡例領域に同じ幅の線を表示したいのですが、それを行う方法はありますか? 現在、凡例はブロック内で正しい色のみを持っています (すべての行で同じサイズです)。
凡例はキャンバスの上にオーバーレイされるため、css を操作してこの機能を取得できます。
var p = $.plot(...); $.each(p.getData(), function(i, el){ $($('.legendColorBox div div')[i]).css({border: 'none', height: el.lines.lineWidth+'px', width: '20px', 'background-color': el.color}); });