Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Java
 QCChart2D for Java
 Legend Font and Symbol Size

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
RunnerGirl Posted - 10 Apr 2008 : 16:03:06
Is there a way to make the symbol for the legend larger? I have tried ChartAttribute.setSymbolSize() but it does not seem to have any effect.

Also, can I set the legend/legend font to not resize on window resizing?

Thanks.
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 10 Apr 2008 : 17:13:30
We tested the following code and it worked fine.

ChartAttribute largeSymbol = new ChartAttribute(Color.yellow, 1, 0, Color.yellow);
largeSymbol.setSymbolSize(18);
StandardLegend legend = new StandardLegend(0.2, 0.15, 0.3, 0.4, legendAttributes, StandardLegend.VERT_DIR);
legend.addLegendItem("Forecast",ChartConstants.HBAR, largeSymbol, legendFont);


You can also changed the size of a legend item using code similar to:

// Change the size of the symbol of the first legend item (index 0) to 18
legend.getLegendItem(0).getLegendItemSymbol().setSymbolSize(18);


You cannot selectively have the legend not resize. You can either have all of the text in the chart automatically resize (axis labels, titles, legends, etc.) or not resize. Use the ChartView setResizeMode method. But you can't mix and match.

gWG.setResizeMode(ChartConstants.NO_RESIZE_OBJECTS);

See the ResizeExamples example program.

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07