Legend rendering

A few days ago I posted the message about too long text of
legend item.
Perhaps I found the way to solve the problem of proper
rendering legend if width of legend items is wider then parent
container.
I want to clip legend item text, and show tooltip over it.
If I define legendItemClass property, I can assign a toolTip
property for each legend item, becuase it inherits UIComponent
class.
From Help of Flex2.0:
"If you want custom behavior in your legend items, you can
assign a subclass of LegendItem to" legendItemClass property.
http://livedocs.macromedia.com/flex/2/langref/mx/charts/Legend.html#legendItemClass
Did anybody define subclass of LegendItem class?

Joao,
Hereby the requested definitions:
<legend bgstyle="fill:#B2C4C4;fill-opacity:150;stroke:#29346B" profile="medium" position="NORTH_WEST">
<column>
<entry style="C.GEMEENTEN RIJNMOND" text="Gemeenten Rijnmond" tab="0" height="15" />
<entry style="C.Z10_6RA_IR_MER_ORIGINEEL" text="Rotterdam Airport 10-6 contour" tab="0" height="15" />
<entry style="C.Z10_7RA_IR_MER_ORIGINEEL" text="Rotterdam Airport 10-7 contour" tab="0" height="15" />
<entry text="Signaalkaart Lucht: NO2 voorspelling 2010" />
<entry style="V.SIG_LUCHT" tab="2" height="30" />
<entry text="Bodemkwaliteit" />
<entry style="V.BODEMKWALITEIT" tab="2" height="45" />
<entry style="C.LEIDSTRAATTOETS" text="Leidingstraten (toetsingsafstand)" tab="0" height="15" />
<entry style="L.LEIDINGSTRATEN" text="Leidingstraten" tab="0" height="15" />
<entry style="L.HSL" text="HSL-tracé" tab="0" height="15" />
<entry style="L.BETUWELIJN" text="Betuwelijn" tab="0" height="15" />
</column>
</legend>
<themes>
<theme name="ANDES2004G_3 RASTER" />
<theme name="GEMEENTEN RIJNMOND" />
<theme name="Z10_6RA_IR_MER_ORIGINEEL" />
<theme name="Z10_7RA_IR_MER_ORIGINEEL" />
<theme name="SIG_LUCHT" />
<theme name="BODEMKWALITEIT" />
<theme name="LEIDSTRAATTOETS" />
<theme name="LEIDINGSTRATEN" />
<theme name="HSL" />
<theme name="BETUWELIJN" />
</themes>
BETUWELIJN STYLE:
<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc></desc>
<g class="line" style="fill:#999900;stroke-width:5;stroke-linecap:BUTT">
<line class="parallel" style="fill:#000000;stroke-width:0.5" />
<line class="base" style="fill:#000000;stroke-width:5.0" dash="4.0,12.0" />
</g>
</svg>

Similar Messages

  • Item Renderer passed to legend

    Hi,
    I have written an item renderer in Action script to change
    the shape of the columns on a column chart. How can I pass this
    through to the Legend?
    I tried adding:
    legendMarkerRenderer=
    "myRenderer"
    itemRenderer="myRenderer"
    inside the column series tags of my mxml but this didn't work
    - I just got a blank screen when I tried to run the application.
    If I put
    legendMarkerRenderer=
    "mx.charts.renderers.DiamondItemRenderer" this works OK -
    but of course, it isn't what I want.
    Do I need to put something inside my action script to tell it
    to pass the info to the legend?
    Thanks in advance for any help.
    M

    Be sure to include the full classpath to your renderer in the
    reference within your MXML. For example, if the package that your
    renderer is in is com.example and the name of your renderer's class
    is MyRenderer, you would write the following:
    legendMarkerRenderer="com.example.MyRenderer". Keep in mind that
    case matters.
    If this doesn't work, there is probably something wrong with
    your ItemRenderer, so you should post that code and we can help you
    out.

  • Bug rendering legend

    Hi All,
    When the last legend entry has a dashed line style the legend line style itself will also be dashed instead of solid.
    Does any body know a workaround?
    Thanks,
    Jeroen

    Joao,
    Hereby the requested definitions:
    <legend bgstyle="fill:#B2C4C4;fill-opacity:150;stroke:#29346B" profile="medium" position="NORTH_WEST">
    <column>
    <entry style="C.GEMEENTEN RIJNMOND" text="Gemeenten Rijnmond" tab="0" height="15" />
    <entry style="C.Z10_6RA_IR_MER_ORIGINEEL" text="Rotterdam Airport 10-6 contour" tab="0" height="15" />
    <entry style="C.Z10_7RA_IR_MER_ORIGINEEL" text="Rotterdam Airport 10-7 contour" tab="0" height="15" />
    <entry text="Signaalkaart Lucht: NO2 voorspelling 2010" />
    <entry style="V.SIG_LUCHT" tab="2" height="30" />
    <entry text="Bodemkwaliteit" />
    <entry style="V.BODEMKWALITEIT" tab="2" height="45" />
    <entry style="C.LEIDSTRAATTOETS" text="Leidingstraten (toetsingsafstand)" tab="0" height="15" />
    <entry style="L.LEIDINGSTRATEN" text="Leidingstraten" tab="0" height="15" />
    <entry style="L.HSL" text="HSL-tracé" tab="0" height="15" />
    <entry style="L.BETUWELIJN" text="Betuwelijn" tab="0" height="15" />
    </column>
    </legend>
    <themes>
    <theme name="ANDES2004G_3 RASTER" />
    <theme name="GEMEENTEN RIJNMOND" />
    <theme name="Z10_6RA_IR_MER_ORIGINEEL" />
    <theme name="Z10_7RA_IR_MER_ORIGINEEL" />
    <theme name="SIG_LUCHT" />
    <theme name="BODEMKWALITEIT" />
    <theme name="LEIDSTRAATTOETS" />
    <theme name="LEIDINGSTRATEN" />
    <theme name="HSL" />
    <theme name="BETUWELIJN" />
    </themes>
    BETUWELIJN STYLE:
    <?xml version="1.0" standalone="yes"?>
    <svg width="1in" height="1in">
    <desc></desc>
    <g class="line" style="fill:#999900;stroke-width:5;stroke-linecap:BUTT">
    <line class="parallel" style="fill:#000000;stroke-width:0.5" />
    <line class="base" style="fill:#000000;stroke-width:5.0" dash="4.0,12.0" />
    </g>
    </svg>

  • Flash Chart Legend Not In Capitals

    I have created a flash chart based upon a function returning sql. The chart displays fine but the legend column names for some reason are converted to initial capitals from all originally being in capitals, eg "SERIES" now equals "Series". I really need the legend to display all capitals as it is in the sql.
    For example:
    The function returns a string similar to this .......
    select NULL as "LINK",
    WEEK as "LABEL",
    VALUE1 as "VALUE1,
    VALUE2 as "VALUE2"
    from MY_TABLE
    order by WEEK
    When the flash chart is rendered on the page the legend displays the two series values as "Value1" and "Value2". Somehow the chart ignores the capital case of the column names and applies initial capitals only over riding the original case.
    There appears to be no over ride for the legend case so where is it coming from ? It shouldn't make any difference but the chart type is a "3D column" style. Not sure if this is a XML question or maybe a Flash Player issue.
    Regards,
    Jack.

    I had the same problem.
    To fix it:
    1. Find a font that is strictly caps. I used Felix Titling.
    2. Edit the flash chart & under the chart attributes set USe Custom XML to yes.
    3. Scroll down almost to the bottom and find the legend tag.
    4. In the font tag for the legend substitute the font you chose.
    This will capitalize ALL the letters in the legend.
    I don't know how to selectively capitalize letters.
    Bob Richards

  • Position Cursor on GRAPH either by dragging it OR entering the dsired position in the Cursor legend

    I've written a VI that allows the user to import a dataset, view it on a graph, and then use cursors to "filter" the range of data that I'm interested in, by sending the cursor.index values from the first graph to an array subset function which feeds a second graph.  The problem is that I'd like to provide the user the ability to position the cursors on the first graph both visually - by dragging - (for "course" control) AND by entering the desired values directly into the cursor legend (for fine control).  The problem is that I cannot find a way to do this, since I have to have the Lock Ring set to “Lock to Plot” in order to capture the index information. According to the documentation, the only way to be able to position the cursors via the Cursor legend is to set the Lock Ring to “Free”, which means the index values are rendered useless, since the cursor is no longer locked to the plot.  If I leave the Lock Ring in "Lock to Plot", and enter a value in the cursor legend, it does move the cursor, but not to where it should.  If I enter a value an x value of 9.0 for cursor 1, the cursor goes to 10.2638.  The next time I enter 9.0, it goes to 9.82794.  I don't understand what the issue is.  Is there a way around this?
    Attachments:
    ppv data filter 3.vi ‏366 KB

    Yes Rudi:  What I want is for the operator to place the cursors by dragging them (just eye-balling it).  The, if they see that the Y cursor (horizontal) is at 10.234, and they want to make it 10, they could simply enter that value in the cursor legend, and the cursor would be placed exactly at 10.  The only way to do this seems to be to select the “Free” option for the cursor.  However, in order to use the first graph to set the boundaries of the second graph, I have to use the Cursor Index from the first as an input to the Array Subset that feeds the second graph.  In order to use the Cursor Index, the first graph has to have its cursor Lock Rings set to “Lock to Plot”.  Am I making this any more understandable, or just rambling?

  • Mapviewer: circles in legend

    Hi,
    for some reason Mapviewer renders circle-markers as ellipse. The style is dynamic:
    mv.addMarkerStyle("SL.OK", MarkerStyleModel.MARKER_CIRCLE, "black", "green", null, null, null, "5");
    Here is a screenshot:
    http://www.imagehosting.com/show.php/214285_omsmaplegend.png.html
    regards,
    Oyvind Idland

    Hi,
    here is the relevant (I think) lines. Note that there are minor changes from when I made the screenshot, the size is "SMALL" instead of "MEDIUM" + some text changes.
    <box>
    <coordinates>579770.2414294558,6632093.360589514 580111.8134053203,6632264.993850242</coordinates>
    </box>
    <legend bgstyle="fill:#e0e0e0;fill-opacity:128;stroke:black" profile="SMALL" location_x="10" location_y="10" font="Dialog">
    <column>
    <entry text="Tegnforklaring" is_title="true" />
    <entry style="SL.OK" text="Ok" />
    <entry style="SL.ERROR" text="Feil" />
    <entry style="SL.FIXED" text="Reparert nylig" />
    </column>
    </legend>
    <scale_bar position="SOUTH_EAST" mode="METRIC_MODE" color1="#64c864" color2="#c86464" length_hint="0" label_color="#000000" />
    <themes>
    </themes>
    <styles>
    <style name="SL.ERROR">
    <svg>
    <g class="marker" style="stroke:black;fill:red;width=10;height=10">
    <polygon points="201,200,0,200,101,0" />
    </g>
    </svg>
    </style>
    <style name="SL.OK">
    <svg>
    <g class="marker" style="stroke:black;fill:green;">
    <circle r="5" />
    </g>
    </svg>
    </style>
    <style name="SL.FIXED">
    <svg>
    <g class="marker" style="stroke:black;fill:blue;width=10;height=10">
    <polygon points="0,0,0,100,100,100,100,0,0,0" />
    </g>
    </svg>
    </style>
    </styles>
    Regards,
    Oyvind Idland

  • Chart legend width in Firefox

    This may already be common knowledge, but we just bumped into what may be the cause of truncated chart legends in Firefox.
    I have been trying to figure out how to expand the width of the legend box that accompanies charts. Firefox sometimes renders the legend box too short to display the full value character strings. But sometimes Firefox renders the legend box with a wider width, so the value strings have plenty of room to fully be displayed.
    IE, on the other hand, reduces the font of the text in the legend box and so can display the full values.
    And then a co-worker noticed a pattern in the way Firefox renders the legend box.
    If the "data point limit" set for a pie chart, for instance, is at least as great as the greatest number of values that can be displayed, Firefox renders the legend box with enough room for the full value character strings. It does not truncate the legend box.
    For example, if the largest number of values that can be displayed in a pie chart is 10, if the "data point limit" for the chart is set to 11 or more, Firefox will render a legend box with sufficient width to display the full value strings.
    On the other hand, if the "data point limit" is set to 10 or less when there can be 10 or more values for the column driving the pie chart, then Firefox will render a legend box that may not be wide enough to display the full value strings. The strings will thus be truncated to the render width of the legend box.
    So far this behavior appears consistent. I

    Actually, it is necessary only to set the "data point limit" equal to, not greater than, the maximum number of column values for a chart. So if the maximum number of column values is 10, if the "datda point limit" is set to 10, the legend box will be wide enough to display the full value strings. It can be set to a number greater than 10 as well, but that is not necessary for the legend box to be wide enough.

  • Legend with a line chart

    I am working on a line chart and want to add a legend to it.
    For the purpose I am using
    <mx:Legend dataProvider="{bigChart}"/>
    Now the y-axis in the chart can display different properties
    based on the items clicked before rendering. It can be profitAmount
    or it could be goodsSold. So the yAxis attribute keeps on changing.
    What happens with this legend is that the bos appears but
    with no text. Is there a way I can force some text to
    appear?

    nevermind I was missing displayName tag

  • Pie chart: Legend position

    By default, the SVG pie charts that HTML DB renders show all the legends in a box off to the side of the pie.
    Is there a way to show each legend next to the slice that it corresponds to?
    Thanks

    Bump. Thanks.

  • Bubble Chart with legend changes axis dimensions according to labels length

    I have a Bubble Chart with legend on the right. Data are by series and  the series are set  dynamically with a  drop down combo which replace the content of each series from time to time.  Every time the series changes, also the name of the series changes and the legend on the right  shows the new series names. The problem is that also the x axis dimension changes according to the new labels size, so the bubble chart changes its axis width in relation to the labels length in the legend. Is its possible to make somehow the bubble chart axis of a fixed lenght?
    Xcelsius 2008, SP4, Windows XP
    Thanks in advance

    Hi Matt,
    I just got a chance to try out your suggestions, and the
    chart that is right in the main application renders the labels
    fine, but the exact same code loaded in as a module doesn't. And it
    never does, not even if the scale changes. Do you know why that
    would be?
    Mukul

  • Graph legend and print options

    When building a graph using the graphTable bean, I'd like to place the legend below the graph instead of above. How can this be done?
    Also, the graph plots a number of lines, each of which is rendered in a different color. Is there a way to make the graph lines cross-hatched, or dotted, or something else so that when printed in black and white the user is able to associate the graph line with the legend?

    Hi,
    Take a look at SAP note #1049778. For recent releases, the device type HP4350 should be already available in transaction SPAD n the system.
    Also as per SAP note #1049778, most of the new device types that were developed within the SAP Printer Vendor program (SAP note #1130927) support the new print options.(see SAP note #1103422)
    Regards,
    Aidan

  • Disappearing Legend Labels in Chart DataWebBean

    Hi all,
    I've used a Chart DataWebBean in a JSP page and have a problem with labels that simply don't show in the Legend Area of the chart. Can anyone tell me how to fix this?
    Thank you in advance.

    Hi,
    Sorry for the late reply but I had some problems with my OTN login and then another project also occupied some of my time, thanks for your reply and I will appreciate it if you can help.
    (1) JDev version: 9.0.2
    (2) Code, theres quite a bit but i've choped out some of the html formatting stuff:
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252
    import javax.sql.RowSet;
    import javax.sql.DataSource;
    import java.awt.Rectangle;
    import java.awt.Rectangle;">
    <% response.setHeader("Cache-Control","no-cache");
    response.setHeader("Pragma","no-cache");
    response.setDateHeader ("Expires", 0); %>
    <TITLE>International Benchmarking System - Graph</TITLE>
    <LINK href="incl/ibproject.css" rel="stylesheet" type="text/css">
    </HEAD>
    <BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <TABLE width="764" border="0" cellpadding="0" cellspacing="0" class="holderTable">
    <TR>
    <!-- <TD width="119" align="center" valign="top"> </TD> -->
    <TD width="636" align="center" valign="top">
    <jbo:ApplicationModule id="IBSbc4jModule" configname="za.org.saawu.ibs.bc4j.IBSbc4jModule.IBSbc4jModuleLocal" releasemode="Stateful"/>
    <jbo:DataSource id="srcOutput" appid="IBSbc4jModule" viewobject="OutputView"/><%
    Integer nKpi = new Integer(srcOutput.getRowSet().first().getAttribute("Kpi").toString());
    String strQuery = new String("KPI='" + nKpi + "'"); %>
    <jbo:DataSource id="srcKpiLookup" whereclause="<%=strQuery%>" appid="IBSbc4jModule" viewobject="KpiLookupView"/><%
    // String strCurrency = session.getAttribute("currency").toString();
    strQuery = "CURRENCY='" + session.getAttribute("currency").toString() + "'"; %>
    <jbo:DataSource id="srcExchange" whereclause="<%=strQuery%>" appid="IBSbc4jModule" viewobject="ExchangeView"/>
    <jbo:DataWebBean id="graphOutput" datasource="srcOutput" wbclass="oracle.jbo.html.databeans.ChartRenderer" />
    <%
    String strTitle = new String(srcKpiLookup.getRowSet().first().getAttribute("Formula").toString());
    // String strTitle = request.getParameter("info").toString();
    String strYTitle = new String(srcKpiLookup.getRowSet().first().getAttribute("Units").toString());
    java.awt.Rectangle recSize = new java.awt.Rectangle();
    // -- Pre-processing --
    if(srcKpiLookup.getRowSet().first().getAttribute("Currency")!=null) {
    if(srcKpiLookup.getRowSet().first().getAttribute("Currency").toString().compareToIgnoreCase("y")==0) {
    String strHolder = new String();
    if(nKpi.intValue()>=203 && nKpi.intValue()<=208) {
    strHolder=strYTitle.substring(strYTitle.indexOf(" ")>-1?strYTitle.indexOf(" "):0);
    strYTitle=srcExchange.getRowSet().first().getAttribute("Hundredths").toString()+strHolder;
    } else {
    strHolder=strYTitle.substring(strYTitle.indexOf("(")>-1?strYTitle.indexOf("("):0);
    strYTitle=srcExchange.getRowSet().first().getAttribute("Description")+" "+strHolder;
    } // if/else nKpi
    } // if currency
    } // if the currency field is not null
    // -- Graph types --
    graphOutput.setCommonScriptName("chart_common.jsp");
    graphOutput.getChart().setGraphType(graphOutput.VERTICAL_CLUSTERED_BARS);
    graphOutput.getChart().setDepthRadius(0);
    // -- Series and data --
    graphOutput.setSeriesLabelColumnName("Wb");
    graphOutput.setDisplayAttributes("Hist3,Hist2,Hist1,Actual,Budget,Target");
    // -- Legend area --
    recSize=graphOutput.getChart().getLegendRect();
    recSize.height+=2000;
    graphOutput.getChart().setLegendRect(recSize,true);
    // graphOutput.getChart().setLegendTextAutofit(true);
    graphOutput.getChart().setLegendMarkersPerRow(2);
    // graphOutput.getChart().setLegendOrient(2);
    graphOutput.getChart().setLegendMarkerPosition(0);
    graphOutput.getChart().setLegendDisplay(true);
    // -- Graph Title --
    graphOutput.getChart().setTitleAutofit(true);
    graphOutput.getChart().setTitleString(strTitle);
    graphOutput.getChart().setSubtitleDisplay(false);
    graphOutput.getChart().setFootnoteDisplay(false);
    // -- Graph Y1 Title --
    graphOutput.getChart().setY1TitleDisplay(true);
    graphOutput.getChart().setY1TitleString(strYTitle);
    // -- Graph Image --
    graphOutput.setImageWidth(700);
    // -- Graph Renderer --
              graphOutput.render();
         %>
    </TD>
              </TR>
         </TABLE>
    </TD>
         </TR>
         <TR>
         <TD height="34" align="center" valign="middle" background="images/footer_bg.gif"> </TD>
         </TR>
    </TABLE>
    </BODY>
    </HTML><jbo:ReleasePageResources />

  • Chart duplicating Series results in too many legend items

    I've created an item for this on bugs.adobe.com - https://bugs.adobe.com/jira/browse/FLEXDMV-2258
    My client requires this in order to finish the application I am working on so I'm hoping someone has a workaround or suggestions for me.
    The forum would not allow me to attach my jpg and mxml file but they are available on the bug url above
    Copied from the bug:
    My application has a collection of machines, each of which has the same properties. I want to graph those properties, but organize them by dates (the values of the properties are different for different days). So the y axis items are dates, and each date has a cluster of machines. Each date has the same number of machines and each machine has the same properties. The issue I'm having is that I want each property (in the example there are 3 properties, represented by BarSeries) to have the same color for each machine in each cluster. So overall, there should only be 3 colors and the legend should have 3 items. Instead, the chart creates different colors for each machine (represented by a BarSet), so there are 3 (machines/BarSets) times 3 (properties/BarSeries) which gives 9 colors and 9 items in the legend. I'm looking to have 3 colors and 3 items in the legend. I was hoping there would be a property on BarSet or BarChart to specify to share BarSeries among the BarSets rather than it forcing unique instances of BarSeries for the BarSets. I tried storing just 3 instances of BarSeries (one for each property) and assigning each BarSet.series property to the stored array of BarSeries, but the outcome was that it would only display one item for each cluster rather than 3.
    Thank you for any suggestions!

    The legend isn't the only problem.  The BarSets are being rendered with different colors for each BarSeries when I want each BarSet to have the same set of colors.

  • Conditional legend in DVT graph

    Hi,
    Is there a way to somehow conditionally show/hide the legend tag of a DVT based on some runtime values?
    <dvt:barGraph id="barGraph1" >
      <dvt:legendArea automaticPlacement="AP_NEVER" rendered="false"/>
    </dvt:barGraph>I checked out the rendered property and it is not EL accessible so obviously this isnt something you can set at runtime.
    But I am just wondering if somebody has done a 'hack' or 'workaround' for this.
    Thanks.
    JDEV 11G PS5

    ...somehow I got confused with the reference documentation http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12418/tagdoc/dvt_legendArea.html
    I just looked at the document and it says it is not EL Accessible. Only a TRUE or FALSE are the valid values so my first thought is that I cannot set this at runtime using managed bean.
    But I noticed that you can still set this value in a managed bean at runtime by clicking the downward icon at JDveloper attributes.
    Not sure if my understanding of the documentation is correct or there is just some problem with the documentation.
    <dvt:legendArea automaticPlacement="AP_NEVER"
                                        rendered="#{pageFlowScope.myBean.isShowLegend}"/>Anyhow my use case is solved.

  • Using Custom Legend without Using Legend Class for line Chart

    Hi ,
    I m trying to create legend with checkbox without using Legend class of flex, but problem is that how to use itemrenderer of lineseries in the legend.
    My requirement is like this:

    my problemb is how to get that shape and use in container .
    i am using hbox in that i have checkbox ,label and i tried to use Image or IFlexDisplayObject but i am unable to assign that renderer to either  image or IFlexDisplayOBject nothing isd working.
    any suggestion for what component i shall use to assign the itemrenderer of lineseries.
    Thanks for replying

Maybe you are looking for