PDA

View Full Version : Line chart legend / x position | Legend getting cut off.



peb7268
3 Mar 2014, 1:06 PM
Hi all, I have a line chart that has a width of 755. I want to position my legend's X value 800px from the left which I am successfully doing. It is being cut off though since my svg and parent container are only 755 wide. How can I overcome this? Maybe set 2 diffrent widths or some padding trickery? Ive tried editing the padding and overflow of the chart object unsuccessfully.

arthurakay
3 Mar 2014, 1:55 PM
Are you trying to have some sort of overlay?

I am having trouble visualizing what your goal is.

peb7268
3 Mar 2014, 3:03 PM
Just trying to add some spacing for formatting. Some left margin to push the legend away from the chart.

arthurakay
3 Mar 2014, 4:19 PM
Sadly there's no "margin" config on the Legend class... but you probably already knew that :D

Alternatively you can try to override the calcPosition() method - but that will likely have some other repercussions since the calculated position is based upon factors like the box's size... so long story short you may have to override a few other things.

This CAN be done, but it might be a bit of work.

peb7268
4 Mar 2014, 7:09 AM
Ok thanks for the info.