Chart legend : adding tooltip on each item

Hi,
My app displays a simple Linechart and its legend. I'm
surprised to see that the Legend component doesn't provide many
possibilities in accessing each of the items that compose it.
First, I'd like to add a tooltip on each item of the legend.
Then I would like to display a checkbox in front of every marker,
to display/hide the corresponding item in the Linechart.
One way could be to extend the Legend item (about this I
found
this
nice - yet complicated - example), but I'd really like to know
if there is a more simpe way to achieve it. As the Legend component
is very dependant from its dataprovider, maybe I'd rather create my
own custom legend, using my chart's values ?
Any help will be appreciated ! Popop ./.

les_paulde wrote:
wow, thanks for your swift reply! This definitely solved my problem and I can now run the query. The code turned out as follows:
String convList = listI.toString();
convList = convList.replace("[", "(\"");
convList = convList.replace("]", "\")");
convList = convList.replaceAll(",", "\",");
convList = convList.replaceAll(" ", " \"");
And what happens if the String representation of the object in your list contains one of the characters you're replacing? It will go awfully wrong!
This is safer:
public static String asString(List<?> list) {
    StringBuilder b = new StringBuilder();
    b.append('(');
    for(int i = 0; i < list.size(); i++) {
        b.append('"').append(list.get(i)).append('"');
        if(i < list.size()-1) b.append(", ");
    return b.append(')').toString();
System.out.println(asString(listI));

Similar Messages

  • Yone Tooltip for each item of select-list

    Could an

    To set the tooltip for each value selected from Drop Down list - means value is selected in drop down list and the mouse over on the field (i thought this way, if its not correct ignore the same.
    For the above case check the selected drop down value on change event and set the desired text as tooltip.
    For example
    if(xfa.event.newText == "One")
    this.assist.toolTip.value = "You Selected Choice " +xfa.event.newText;
    Thanks,
    Raghu.

  • Crystal reports V8.5 Chart legend adding up incorrectly - when using negative values

    Post Author: dawnyanne
    CA Forum: Crystal Reports
    Hi
    if anyone can help me I would be extremely grateful!
    I have a pie chart with a legend. There are just two values that are showing but one of the values is a negative value and the total of the legend is adding up incorrectly. Here is how it is showing at the moment
    Cash                 -0.71
    Uk Equities     100.71
    Total              101.42
    here is how it should be
    Cash               -0.71
    UK Equities   100.71
    Total             100.00
    I can set the chart amounts to be percentage - but then it comes out as only one decimal place and I need two.
    Any help would be very much appreciated!
    kind regards
    Dawnyanne

    Hi Ryan
    The search string 'crystal net 40' (search box in top right corner, returns this KBA:
    2105208 - ER - CR .NET SDK has a Section limit set to 104 and subreport limit of 40
    SP 13 for "SAP Crystal Reports, Developer Version for Visual Studio .NET" can be downloaded here:
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow me on Twitter

  • Adding parentheses to each item in HashSet

    Dear All,
    Having almost completed my first java tool which queries a database to allow user-defined filtering, I'm running into a last 'small' problem:
    I won't bore you guys with the whole thing, but instead will just focus on the part where i'm stuck, in the hope that somebody can give me a useful tip as to how to solve this! Thanks very much in advance for any input!
    Basically, what it comes down to is that I query the database twice, resulting in two lists of data stored as HashSets in Java, to then work out the intersect of them both with the listI.retainAll(listII) function. Finally, I want to use the merged list to query the database again, using the variables listed in the final set. In order to use the list in the query, I first convert the HashSet to a string as follows:
    String convList = listI.toString();As this results in a string with square brackets [] and mySQL needs regular brackets, I convert them like this:
    convList = convList.replace('[', '(');
    convList = convList.replace(']', ')');This will result in something along the lines as (result1, result2, result3, result4, etc.). The problem is though, that I would need it to be like
    ("result1", "result2", "result3", "result4") in order for mySQL to accept it using the IN clause.
    I tried to add the parentheses using:
    convList = convList.replaceAll(',', '",');
            convList = convList.replaceAll(' ', ' "');but the Java compiler complains of an error with "unclosed character literal", so I was hoping somebody could maybe give me a hint as to how I can add parentheses for each member in the list? Thanks alot in advance

    les_paulde wrote:
    wow, thanks for your swift reply! This definitely solved my problem and I can now run the query. The code turned out as follows:
    String convList = listI.toString();
    convList = convList.replace("[", "(\"");
    convList = convList.replace("]", "\")");
    convList = convList.replaceAll(",", "\",");
    convList = convList.replaceAll(" ", " \"");
    And what happens if the String representation of the object in your list contains one of the characters you're replacing? It will go awfully wrong!
    This is safer:
    public static String asString(List<?> list) {
        StringBuilder b = new StringBuilder();
        b.append('(');
        for(int i = 0; i < list.size(); i++) {
            b.append('"').append(list.get(i)).append('"');
            if(i < list.size()-1) b.append(", ");
        return b.append(')').toString();
    System.out.println(asString(listI));

  • Arranging Chart Legend Items

    Is there a way to change the sort or arrangement of items in a chart legend? I am doing a simple stacked bar chart with 2 measures - % Pass and % Fail (for a school system), but it always shows % Fail as the first item in the legend. I would like to show % Pass first...is there any way?
    Thanks

    hi,
    We can do using combine with similar request
    Col A Col B '%Pass' 1--Req 1
    Col A Col B '%Fail' 2 --Req 2
    Asc order on numbers(1,2) .So that the legends will come %pass and %fail try it in pivot table
    I didn't tried this but i hope it ll work...All the best
    thanks,
    saichand.v

  • Adding user review comments to each item

    I am creating my site in Muse and then will be publishing to BC. My website will be have a least 7,000 items on it. I want to be able to have user review comments for EACH item. will I be able to do this using BC? I am guessing every item would have to have it's own page and then a module added to it. I am looking at adding 7,000 modules unless there is a faster way. Thank's in advance all

    Yes. Please have a look at the following article about the comments module http://kb.worldsecuresystems.com/758/bc_758.html
    Also, you can integrate Facebook comments as per http://kb.worldsecuresystems.com/851/cpsid_85118.html

  • Use comment from X-Channel data in Chart Legend

    Hi,
      Does anybody know how to set up a chart legend that will display the channel comment for the X-Channel?  There is a standard option for selecting the Y-Channel comment and the line below also achieves this.  In my case the Y-data is shared across all curves and the X-Data is independent.  Thanks in advance!
    Display the Y-Channel Comment:
    @CC(CCN)@

    You're right, it doesn't work with "curve-related text", no idea, why...
    But there is a way - probably not the best one - to do this.
    Dim oMy2DaxisSystem, oMy2DCurve, oMyShape, oMyPosition, oMyLegendColumns, oMyCurveLegendPos
    Call Report.NewLayout()
    Set oMy2DaxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem,"My2DAxisSystem")
    Set oMyPosition = oMy2DAxisSystem.Position.ByCoordinate
    oMyPosition.X1 = 20
    oMyPosition.X2 = 80
    oMyPosition.Y1 = 20
    oMyPosition.Y2 = 80
    Set oMy2DCurve = oMy2DaxisSystem.Curves2D.Add(e2DShapeLine, "MyNewCurve")
    Set oMyShape = oMy2DCurve.Shape
    oMyShape.XChannel.Reference = "[1]/[15]"
    oMyShape.YChannel.Reference = "[1]/[25]"
    oMy2DaxisSystem.CurveLegend.Visible = True
    oMy2DaxisSystem.CurveLegend.Settings.ShowGridLines = FALSE
    Set oMyCurveLegendPos = oMy2DaxisSystem.CurveLegend.Position
    oMyCurveLegendPos.SizeMode = eLegendSizeElementwise
    oMyCurveLegendPos.ElementHeight = 6
    oMyCurveLegendPos.ElementWidth = 35
    oMy2DaxisSystem.CurveLegend.Settings.Font.Size = 5
    Set oMyLegendColumns = oMy2DaxisSystem.CurveLegend.Columns
    Call oMyLegendColumns.Add
    oMyLegendColumns(1).Type = eLegendTextComment
    oMyLegendColumns(1).RelativeWidth = 1
    oMyLegendColumns(2).Type = eLegendTextCustomText
    oMyLegendColumns(2).RelativeWidth = 1
    oMyLegendColumns(2).Text = "@CC(CurrXChnNo)@"
    Call Report.Refresh()
    The code is available in Examples, I just added some minor details.
    Another way (shorter, but not so universally valid) is to extend your code:
    Report.ActiveSheet.Objects.Item("2DAxis2").CurveLegend.Columns.Item(1).Type = eLegendTextCustomText
    Report.ActiveSheet.Objects.Item("2DAxis2").CurveLegend.Columns.Item(1).Text = "@CC(CurrXChnNo)@"
    IMO, this works only if you already have the graph.
    And take care about the object name ("2DAxis2"), this can vary from page to page...

  • Chart legend incomplete BO XI 4.1

    Dear all,
    I am struggling with a point which should be an easy one as it used to work perfectly in previous versions...
    I have a chart legend with quite a lot ot items but I can not manage to "split" the legend in 2 or more lines.
    Automatically, all criteria are on one line and each headings are otherwise cut (wrap) otherwise some do not appear (Truncate).
    I am working under BO XI 4.1 (Webi).
    I can provide further details if needed,
    Thank you for your help,
    Best regards,
    Audrey

    Hi Audrey,
    I am agree with Sathish, Measure Heading is getting split automatically in BI 4.1, But if you are looking for Legend title should split in multiple lines you can use following trick.
    And if your getting truncated measure headings make sure you have set Text Policy to Wrap.
    Output :
    Regards,
    Veer

  • CRVS2010 Beta 2 Pie chart legend displaying "_e_Total:1_n_pseudoloc_"

    Instead of displaying "Total" at the bottom of my pie chart legend I am getting the following text: "_e_Total:1_n_pseudoloc_"
    The values and percentages calculate correctly, but the label is unusual.

    Hello,
    I have the same problem with my pie chart. My report was fine before I did my update to CRVS2010 Beta 2. I was using crystal report 11.5.
    My report is really simple. I have a resume chart that you can drilldown. Each drilldown show the same chart for the selected
    item.
    I'm using Windows 7 Professionnel 64 bit in french (canada version).
    Visual Studio Version 10.0.30319.1
    Framework 4.0.30319

  • Chart legends, only one showing on stripchart

    1. I selected 4 legends on my stripchart, but see only "Trace 1." No other legends are visible. How to get them visible?
    2. How to change the text of each legend? I tried the following before and after the PlotStripChart statement but don't see the INK#X texts, just a single "Trace 1" legend.
            SetPlotAttribute (g_hmainPanel, SS_PANEL_STRIPCHART, 0, ATTR_PLOT_LG_TEXT, "INK#1");
            SetPlotAttribute (g_hmainPanel, SS_PANEL_STRIPCHART, 1, ATTR_PLOT_LG_TEXT, "INK#2");
            SetPlotAttribute (g_hmainPanel, SS_PANEL_STRIPCHART, 2, ATTR_PLOT_LG_TEXT, "INK#3");
            SetPlotAttribute (g_hmainPanel, SS_PANEL_STRIPCHART, 3, ATTR_PLOT_LG_TEXT, "INK#4");
    I do get all four traces showing on the stripchart.
    Any ideas?
    Thanks,
    John
    Solved!
    Go to Solution.

    Hi QuerulousJohn
    In order to get the various elements showing in your legend, you can select the .uir, double click your strip chart to edit its attributes. Select Traces, and then if you notice you can select the number of traces as well as which one you are looking at. To get each of the four showing on your legend you need to toggle "Trace on Legend" in the bottom left corner for each of the ones you want to show.
    For setting the text of each item in your legend you can actually use SetTraceAttributeEx (panelHandle, PANEL_CHART, 1, ATTR_TRACE_LG_TEXT, "text");
    Where the parameters are the panel, the chart/control ID, which trace you are referencing, the attribute, and the value.
    Hopefully that should get things working for you, definitely follow up if it is not the solution to your issue.
    Have a great day!
    James W.
    Applications Engineer
    National Instruments

  • Custom Formatting Of Chart Legends

    I've been playing with Flex Charting, and I have lots of nice
    looking graphs that I've created from database feeds. However, what
    I really want to know how to do is format the chart legend better.
    For example I have a pie chart that has about 50 different data
    items/series and the legend is huge in either horizontal or
    vertical mode it prints all the way down the page. How can I make
    it two, three or more columns?

    Hi Justin,
    I think, there is no way to do such a customization with the standard Javadoc (i.e. powered by the Standard Doclet).
    After all, the job of the standard Javadoc is doing standard (general) things and I just cannot imagine any general rule (setting or option) that would embrace all kinds of possible customizations about displaying of annotations.
    So, the only way in your situation would be to modify the doclet itself. You can try tweaking the standard doclet: overload some its classes or change sources (according to the license they provide). However, I just can say, that way proved to have lots of limitations.
    Fortunately, I could suggest you a different rote that would allow you solving your problem in a few minutes. We have a product called "DocFlex/Javadoc":
    http://www.filigris.com/products/docflex_javadoc/
    This is a highly customizable Javadoc doclet. More exactly, this is a system for rapid development of professional quality doclets (with the support of both framed/single-file HTML and RTF output).
    With that tool, the generation of every sort of Javadoc output is programmed in special templates (using graphic Template Designer). The product is provided with the "standard template set" that generates the HTML Java API documentation very similar to the standard Javadoc.
    In fact, to solve you task, you will need to modify a subtemplate called "annotations.tpl". See on this page: http://www.filigris.com/products/docflex_javadoc/templates.php
    If you are interested about all this, we could help you to modify the necessary template absolutely free. Then, you will need only to buy a full product license to have everything work without limitations and that will be all!
    So, if you are interested, please let us know by sending a e-mail to the address found on this page:
    http://www.filigris.com/company/contact.php
    Regards,
    Leonid Rudy
    http://www.docflex.com

  • How to create a background image for each item in a List object

    Hello.
    I am trying to create a background image that displays whenever a user posts something to a list.  For example when a user posts text it would appear in a list.  The new item in the list would contain a specific background image with the users text appearing on top of the background image.  I do not want a background image for the entire list, rather each item within the list.
    I am not sure how clear this is so I added an image below.  When a user enters text in and clicks the "post-it" button their text would appear below with the sticky note background. 
    I am not sure which list type would be best for this problem or how to create insert the image, so I am open to suggestions. 
    Thank you for your help.  Any advice or guidance will be greatly appreciated!

    Hi
    the easiest way would be with itemRenderer.
    You have to do two things:
    1. In your list declaration use a item renderer: <mx:List itemRenderer="myRenderer"/>
    2. create a flex component myRenderer that will be the single item. This can be a canvas with a background image and a text field on it.
    When you add a new item to the list, a new myRenderer item will be created and the data property will be passed to it. So you have to put "data" in your textField.
    If you need more help try looking at Tour de Flex samples, they're pretty easy.
    Andrei

  • SSRS Hide one data value label in chart legend

    Is it possible  to hide one value in the legend? I've got a stacked bar chart, but there's one value that I don't want to display in the Legend. Is it possible to hide this particular color and label in the legend?
    Thanks,
    Chris

    Hi Chris,
    Yes. In Reporting Services 2005, you could add a filter to hide one value label in the chart legend. This can be done with the following instructions:
    In Report Designer, open the chart properties dialog box and go to Data tab.
    Double click the item in the Series groups to open the Grouping and Sorting Properties dialog box.
    Switch to the Filter tab. Add a filter using the following setting:
    Expression: =Fields!<FieldName>.value
    Operaiton: !=
    Value: =”value”
    If you have any further questions, please let me know.
    Thanks.
    ***Xiao Min Tan***Microsoft Online Community***

  • Each item in the delivery should have separate invoice

    HI friends,
    who to do separated invoice for each item of the delivery, even if the bill to party and billing dates are same.
    thanks
    nitchel

    Hi,
    Rather than block individual items manually each time an invoice is raised, a copy control routine can be written in which you can modify item level split criteria which is explained below in detail.
    In VOFM transaction, go to 'Data Transfer' and choose 'Billing Documents'. You can see a list of routines which can be used in copy control configuration. Define a new routine in this list (501 for example).
    Copy the piece of code from routine 001 (include FV60C001) to this new routine and add another field 'POSNR' to the structure ZUK. Copy delivery item number to ZUK-POSNR (ZUK-POSNR = LIPS-POSNR) before ZUK gets assigned to VBRK-ZUKRI.
    Then assign this routine in the item level copy control of delivery to billing of the respective document types. This will ensure that as many invoices get generated as there are delivery items.
    But before that, decide the scope for this invoice split, i.e. for what document types / organizational units, etc. this is required. These checks may be added as initial conditions in the routine before LIPS-POSNR is copied to ZUK.
    Cheers,
    KC
    PS: I had earlier tried some other split criteria which worked fine. If this doesn't work as it is described above, you may have to do minor fine tuning but the idea of splitting invoices by tweaking ZUKRI will certainly work.

  • Error in chart legend totals when there is a negative number involved

    Post Author: dawnyanne
    CA Forum: Charts and Graphs
    Hi
    if anyone can help me I would be extremely grateful!
    I have a pie chart with a legend. There are just two values that are showing but one of the values is a negative value and the total of the legend is adding up incorrectly. Here is how it is showing at the moment
    Cash                 -0.71
    Uk Equities     100.71
    Total              101.42
    here is how it should be
    Cash               -0.71
    UK Equities   100.71
    Total             100.00
    I can set the chart amounts to be percentage - but then it comes out as only one decimal place and I need two.
    Any help would be very much appreciated!
    kind regards
    Dawnyanne
    Filed under: chart legend incorrect totals negative values

    First see KnowledgeBase Entry 1XPH5BV7.
    What processor speed was the Windows NT machine? What is the processor speed of the PXI-8170 (700 or 850 MHz). How many channels are you aquiring? Which version of LabVIEW Real-Time are you using? Which version of NI-DAQ are you using? Are you using an example program or one of your own programs? What priority are you running the VI at? (Time critical priority is recommended for DAQ VIs - remember to provide sleep time to allow lower priority operations, such as the user interface thread, to run).
    If you feel this behavior may be a bug, please contact National Instruments technical support.
    Regards,
    Chad H.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask

Maybe you are looking for