Legend Problem in multiple series chart

Hello,
I am getting problem in displaying legend. I have created a chart with  multiple series and custon color. Here is my code. You can copy paste it.
Out of 3 only one legend marker n label coming.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
      [Bindable]
      public var SMITH:ArrayCollection = new ArrayCollection([
        {date:"22-Aug-05", close:41.87, close2:45.23},
        {date:"23-Aug-05", close:45.74, close2:40.90},
        {date:"24-Aug-05", close:42.77, close2:46.99},
        {date:"25-Aug-05", close:48.06, close2:40.22},
     [Bindable]
      public var DECKER:ArrayCollection = new ArrayCollection([
        {date:"22-Aug-05", close:157.59},
        {date:"23-Aug-05", close:160.3},
        {date:"24-Aug-05", close:150.71},
        {date:"25-Aug-05", close:156.88},
    ]]>
</mx:Script>
  <mx:Style>
    ColumnChart {
        paddingLeft:20;
        paddingRight:20;
        paddingBottom:10;
        paddingTop:10;
     Legend {
     paddingLeft:20;
        paddingRight:20;
        paddingBottom:20;
        paddingTop:10;
  </mx:Style>
      <mx:Stroke id="axisStroke"
        color="#000000"
        weight="2"
        alpha=".75"
        caps="round"
    />
<mx:VBox width="500" height="500" borderColor="#000000" cornerRadius="20" themeColor="#009DFF" borderStyle="solid" borderThickness="1" horizontalAlign="center" x="246.5" y="61">
     <mx:ColumnChart id="multipleChart"  showDataTips="true" width="100%" height="100%"  seriesFilters="[]">
        <mx:horizontalAxis>
           <mx:CategoryAxis id="h1" categoryField="date"/>
        </mx:horizontalAxis>
        <mx:horizontalAxisRenderers>
            <mx:AxisRenderer placement="bottom" axis="{h1}">
            <mx:axisStroke>{axisStroke}</mx:axisStroke>
            </mx:AxisRenderer>
        </mx:horizontalAxisRenderers>
        <mx:verticalAxisRenderers>
            <mx:AxisRenderer placement="left" axis="{v1}"><mx:axisStroke>{axisStroke}</mx:axisStroke></mx:AxisRenderer>
            <mx:AxisRenderer placement="right" axis="{v2}"><mx:axisStroke>{axisStroke}</mx:axisStroke></mx:AxisRenderer>
        </mx:verticalAxisRenderers>
        <mx:series>
           <mx:ColumnSeries id="cs1" horizontalAxis="{h1}" dataProvider="{SMITH}" xField="date" yField="close" displayName="Smith" fills="#6693B0">
                <mx:verticalAxis>
                   <mx:LinearAxis id="v1" minimum="40" maximum="50"/>
                </mx:verticalAxis>
           </mx:ColumnSeries>
           <mx:ColumnSeries id="cs3" horizontalAxis="{h1}" dataProvider="{SMITH}" xField="date" yField="close2" displayName="Smiths" fills="#86D1E4">
           </mx:ColumnSeries>          
           <mx:LineSeries id="cs2" horizontalAxis="{h1}" dataProvider="{DECKER}" xField="date" yField="close" displayName="Decker">
                <mx:verticalAxis>
                    <mx:LinearAxis id="v2" minimum="150" maximum="170"/>          
                </mx:verticalAxis>
                <mx:lineStroke>
       <mx:Stroke color="#CC3300" weight="1"/>
    </mx:lineStroke>
           </mx:LineSeries>
        </mx:series>
     </mx:ColumnChart>
     <mx:Legend dataProvider="{multipleChart}"  horizontalAlign="center" direction="horizontal"/>
</mx:VBox>
</mx:Application>

I've run into this, too:
Remove the fills property from each ColumnSeries and it'll work.
If you want to use the fills property, you'll have to add your own custom legend code.
From the Flex API:
"If you specify the fills property and you want to have a Legend  control, you must manually create a Legend control and add LegendItems to it."

Similar Messages

  • Multiple series chart with differing dates

    Is there a way to display multiple series on a chart when the
    data for the horizontal axis doesn't match up? For example:
    if data1 (val, date) is (10, 01/05/2008) (15, 02/08/2008)
    (20, 03/01/2008)
    and data2 (val, date) is (8, 01/12/2008) (25, 02/10/2008)
    (30, 03/14/2008)
    how would I get the data to display on a multiple series
    chart. Right now, I am using a CategoryAxis for the horizontal
    axis. If I do something like this:
    hAxis.dataProvider = data1;
    hAxis.categoryField = "date";
    it will show only the series for data1, but not data2.

    Thanks for the reply.
    That link tells you how to add multiple axis to a chart which
    is what I'm doing, but unless you want to have two horizontal axis
    on the bottom (which looks terrible) or put one on the top and one
    on the bottom (which looks awkward), this solution is not very
    good.
    The problem is that the data ranges for the horizontal are
    the same, but the individual timestamps are slightly different,
    sometimes off by only a few hundredths of a second.
    To attempt to work around this, I merged the two arrays, but
    that seemed to mess up the display of the data.
    Is there not a way to just draw the second series on top of
    the first without having to lock it to the axis? It seems like the
    answer is no when using the standard packages. But is there a way
    to override this and get it to draw properly?

  • Candlestick chart problem with multiple series

    Hello,
    I added one mx:CandlestickSeries object and couple additional
    mx:LineSeries objects to the chart. All series are represented but
    still I have one problem. More series I add - less candles are
    becoming of CandlestickSeries data. It seems that there should be
    any scaling option for all series in the chart or something like
    this, but I cannot find it. I'm still new in Flex Can anyone halp
    me with this?
    Thanx in advance
    marukas

    I've added screenshots to get better view of the problem.
    Here is chart with addtional series:
    Chart
    with multiple series
    And here nothing is changed except that additional line
    series were removed:
    Chart
    with only one CandlestickSeries
    Is it possible to get the same candles as in 2nd view with
    addiotnal series added?

  • OBIEE10g-Multiple Series Chart.

    Hi Friends,
    I have a requirement in OBIEE10g.
    MULTI SERIES CHART with STACKED.
    If it is possible, Please tell me the steps.Its urgent.
    Help appreciated.
    Regards,
    Chaitanya.P

    Thanks for the reply.
    That link tells you how to add multiple axis to a chart which
    is what I'm doing, but unless you want to have two horizontal axis
    on the bottom (which looks terrible) or put one on the top and one
    on the bottom (which looks awkward), this solution is not very
    good.
    The problem is that the data ranges for the horizontal are
    the same, but the individual timestamps are slightly different,
    sometimes off by only a few hundredths of a second.
    To attempt to work around this, I merged the two arrays, but
    that seemed to mess up the display of the data.
    Is there not a way to just draw the second series on top of
    the first without having to lock it to the axis? It seems like the
    answer is no when using the standard packages. But is there a way
    to override this and get it to draw properly?

  • Problem with Multiple Series - CFCHART

    Using CF9, trying to create a simple chart with two series.  Problem is that when there are no values, CFCHART draws a line but with values of "0".
    The first series is a set of monthly values (12 values) one for each month in 2011. The second series are also monthly values, but for 2012 YTD (Jan thru May 2012).  Range for all values is between 90 and 100, so I have it set to "scale" so you can see if year-over-year is better or worse. 
    Am trying to plot Series 1 (2011) on one line, and Series 2 on a second line.  This allows comparison of year-over-year results.  Have two QofQ, one that contains the twelve 2011 values, and one that contains the five 2012 monthly values.  X-Axis values are numbers (1-12 for 2011, and 1-5 for 2012).  However, I re-format the results using "CreateDate", so CFCHART can recognize a date, and format/display only the "months" on the chart (i.e., JAN, FEB, MAR....... DEC).   This is working, since bottom of chart shows JAN thru DEC.
    The chart displays 2011 correctly with 12 points and a line.  But for 2012, it displays the 5 points (Jan-May) with their values, then displays Jun-Dec 2012 with values of ZERO.  So on the May 2012 plot, you have this big line that runs from 90% in May, down to 0% in Jun, then 0% for the rest of 2012.  I only want it to plot the 2012 line thru May.
    If you remove the 2011 series from the CFCHART, it displays correctly, and only displays the 5 months in 2012 (Jan-May).   And if you remove the 2012 series, it displays correctly, with all 12 months in 2011.
    I just need it to display exactly like that, when two CFCHARTSERIES are used.   Even if you <CFOUTPUT> the 2012 query, you get 5 items, Jan-May.  So not sure why it want to chart 12 items for 2012, with all ZEROs for June - Dec 2012.
    Appreciate any help/advise on how to get year-over-year lines, with 12 data points for 2011 and 5 for 2012. 
    Gary

    Thanks, I found the solution doing a Google search, which led me to this Adobe forum link:
    http://forums.adobe.com/message/3304324#3304324
    which is same one you mentioned.  I was so relieved it wasn't a problem with my code, I kept testing for errors, couldn't find any.
    We are in the process of upgrading from CF7 to CF9.  We are developing on CF9, but still using CF7 in production, hopefully for only a few more weeks until we get our new CF/SQL Servers, running CF9.
    Until then, have to write two versions of the .CFM file, one that runs on CF7 servers, and one for the CF9 test servers.
    Thanks again for getting back, much appreciated.
    Gary

  • Multiple series charts foreground & background

    I am defining a chart in action script and wonder how to get
    define which series gets displayed on top of the other. For
    example, take a chart with 2 vertical Axes sharing the x axis for
    dates. Y1 is a line and gets defined first and added to the
    seriesArray (an Array), then Y2 is a column series and gets defined
    and added to the seriesArray. Then:
    myChart.series = seriesArray.toArray();
    But I really want the column displayed behind the line. Is
    there anyway to do this other than adding the axes to the array in
    reverse order?

    Post Author: Dac
    CA Forum: Charts and Graphs
    thank you so much for the response and help!
    i've done the settings you said - it really makes sense what you saind in the message -  but still nothing is drawn on the chart.
    see the screen shot of all the settings and table data
    also there comes that warning CR message which i disregard and continue - but still does not work fine...
    any other suggestions? I still have hope for a solution

  • Change colors in multiple pie chart - with legend

    I need to change the colors of groups shown in multiple pie chart diagram in CR XI.
    I managed to actually change the colors in the diagram by using highlighting rules in the wizard. (Sorry, I need to guess the correct English terms since I am using the German version.)
    But the colors in the legend are not affected by the rules, so the legend displays colors which are not shown in the diagrams at all. How can I fix this?
    Thanks in Advance
       Andreas

    Hi Andreas
    I have the same problem.
    I found this BO note:
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361706E6F7465735F6E756D6265723D3131383434373026
    I says that this behaviour is by design and cannot change
    Not what you would expect really! 
    If the series colour can be changed then why does the series marker colour not match the series it represents?
    Patrick

  • Drill Down for Multiple Series in a Line Chart

    Hello,
    I seem to have a problem with the drill-down functionality in a line chart that has multiple series.
    I have a line chart that displays the readings of a patient over a period of 1 month. For each day, there is the glucose level reading, blood pressure reading, etc... So, each reading is a different series in my line chart graph.
    The basic requirement is: With a mouse over event on the chart, I am willing to display all the data that belongs to that day. The data will be displayed at the bottom of the screen in a small panel. It is very simple to do it when the line chart has only 1 series:
    i) Enable drill down.
    ii) Choose 'Row' as insertion type.
    iii) Fill out the destination field.
    iv) Make sure your labels (at the bottom of the screen) get the data from the destination cell.
    When there is more than one series, it becomes very difficult. XCelsius will not let me use the same destination cells for different series. So, I will have to use other destination cells. In that case, I will not know on which day is the user on. Is there any way to achieve this functionality?
    Let me know if you need further information.

    This is certainly possible, but there's a bit of a trick to it (and really hard to explain without screenshots!). There's two halves to it:
    1. Write the date that has been selected to a cell (for each series).
    2. Write the name of the series that was clicked to some cell (this is the property 'Series Name Destination').
    So let's say your three series are Glucose, Blood Pressure and Temp. Have those series names in B1,C1,D1 (with your dates down in column A). Insert a row below the series names (2:2), and then set up your insertion type for the chart as 'row'. The source data (for all three series) should be your list of dates in column a. The insertion cells for the three series will be, in order, B2,C2,D2. Now, depending on which point is clicked in the chart, the selected day will be inserted into one of those three cells. Completely useless unless you know which series was clicked.
    So you need to insert the name of the series that was clicked ('Series Name Destination') into the spreadsheet, let's say in F1. The rest is just Excel formulas. The logic is, you can now tell what series was clicked, and go and look up the date that was inserted for that series, then go and look up the row that corresponds to that date. So to get the date that was just clicked, your formula (in F2) would be =HLOOKUP(F1,B1:D2,2,0).
    Then a VLOOKUP will get the results from that row of data. For example, if I inserted another row at row 3 (to show my 'result' values) the formula in B3 would be =VLOOKUP($F$2,$A$4:$D$13,2,0).
    I hope that makes sense.

  • Flash Chart Legend Problem

    Hi,
    Im having a problem with my flash chart legends in Apex3.0.
    I have changed the name of the Series to what i want to appear in my legend - however the legend just shows "Value" for all my Series.
    Does anyone else have this problem?
    Cheers,
    Immanuel

    Hello,
    I need a legend like this
    No of Clicks('000)
    If i give l" No of Clicks('000)" as column alias, chart says Error :No chart data available.
    If i give "No of Clicks('000')" or "No of Clicks(''000)" as column alias in the query, it displays the correct legend..
    Would anybody tell me how to show the legend like this
    No of Clicks('000)
    Regards,
    Archana

  • Stacked Bar Chart with Multiple Series Sort Question

    Hi,
    Apex version 4.1.1
    I have a stacked bar chart with three separate series, one showing customer effort, another showing project effort and the third showing other effort, summarized by calendar week. The x-axis of the chart is the calendar "week of" date, and the y-axis has a bar for each of the three series. Not every type of effort occurs every week.
    When AnyChart renders the chart, the order of entries on the x-axis seems to be dependent both on which series are present in a given week as well as the "week of" date. Weeks with all three series sort in order by calendar date, followed by weeks where just the 2nd & 3rd series are present, followed by weeks where just the 3rd series is present. See this [url http://tinypic.com/r/b9zdt/6] picture of the chart  noting the "week of" dates. Note that the months go Sep-Oct-Nov-Aug-Oct.
    Is there a way to force AnyChart to sort the x-axis in chronological order regardless of whether there is data for all three series for a given week? I have looked through the AnyChart XML reference but cannot find a way to do this.
    Incidentally, I can solve the sorting problem by combining all three series into a single query:
    select
      null as link,
      week_of as label,
      sum(customer_effort) as "Customer Effort",
      sum(project_effort) as "Project Effort",
      sum(other_effort) as "Training, Admin and Other Effort"
    from ...But if I do this, I cannot figure out how to have each bar on a given week link to a different detail page, e.g., if I click on a bar representing customer effort I want to link to one page, but if I click on a bar representing project effort, I want to link to a different page. I have had a look at the [url http://apex.oracle.com/pls/apex/f?p=36648:59:1570983160946101::NO:::] chart examples  posted on apex.oracle.com, but cannot figure out how to apply to multiple series in a single query.
    Thanks,
    Mike

    Thanks, Jeff. I did try this but for whatever reason it doesn't make a difference. I think it is because if there's no data for a given series for a certain week, there is no entry in the data set that is sent to AnyChart.
    I was able to get around the issue by "filling in" the missing weeks from each data series. To generate the list of "Week Of" dates for a given date range, I used this code:
    select
         trunc (each_day) as week_of,
         0 as effort
    from (
         select
              (to_date(:p920_start_date,:app_date_format) + 2 - to_char(to_date(:p920_start_date,:app_date_format),'D') - 1) + level each_day
         from dual
         connect by level <= to_date(:p920_end_date,:app_date_format) - to_date(:p920_start_date,:app_date_format) + 1
    where
         to_char (each_day, 'D') = '2'This creates an effort entry of 0 for each week within the date range; I use the Monday date of a week as the "Week Of" date. I then union this with my actual data and summarize by week and viola, I get the weeks in order. This also has the benefit of showing a week for which there are no entries in any of the three series.
    Thanks for taking a look at this.
    Mike

  • Plotting multiple series on an SVG Chart

    Hi,
    I am trying to plot multiple series on an SVG Chart. The moment I add a second series, I get the following error:
    "SVG Chart error: ORA-20001: line_chart error: ORA-20001: get_data error: ORA-20001: Parse error: ORA-0093".
    The graph fails to plot multiple series even for the same queries. The query I use is something like the following:
    select null "link", substr(name,7) "Label",value "Value"
    from <table>
    where
    <conditions>
    and name in (<sub-query>)
    order by name desc
    I have previously used an SVG chart to plot multiple series and have never had such problems. Any help would be greatly appreciated.
    I tried deleting and recreating the chart - doesn't help.
    Thanks,
    Aswath

    If you want to order the data do it via an in-line view:
    SELECT *
    FROM (
    select null "link", substr(name,7) "Label",value "Value"
    from <table>
    where
    <conditions>
    and name in (<sub-query>)
    order by name desc
    )

  • Line Chart with Multiple Series

    Post Author: JayZee
    CA Forum: Charts and Graphs
    HI
    I am trying to create a line chart with multiple series for trend analysis on CR XI but not having much luck, I thought it would be so simple to do!
    My data is provided summarized on the server and is returned as 12 rows:
    Month       Year1        Year2      Year3      Year4     Year5January      100           80          75           90          120February      85           25           40           25          80etc for the rest of the months
    My problem is that I can only get the chart to accept the values to display as a summary and not just as the data pulled back from the server.  I have read an article on the support site for Crystal 6.0  but it doesn't seem to translate well into XI.
    If necessary I could redesign the table to bring back un-summarized data but that is quite a big job.
    Any help greatly appreciated.
    Jay

    Post Author: Tim Wise
    CA Forum: Charts and Graphs
    In the chart expert, put Month in the 'On change of' box and put each year in the 'Show values' box. This puts the month on the x-axis and plots each year as a line.
    Is that what you want?
    I did this in CR 2008 using your data in an Excel sheet.

  • Flash chart performance issue with multiple series

    Hi,
    We have a problem with the performace of a line graph which has multiple series.
    I have set up an example application here:
    http://apex.oracle.com/pls/apex/f?p=37504:1
    The application contains two charts. The 'Mulltiple Series' chart has twelve series behind it and allows the user to include mutiple series data. The other chart has just one series.
    The single series chart takes only a couple of seconds to render, however the mutiple series chart takes around 10 seconds even when no additional series have been selected. Using Firebug I have observed that the apex_util.flash procedure is taking around 8 seconds to generate the XML, and it includes null data values for the series that aren't selected.
    My question is how can I make each series conditional, such that no data is included in the XML if the series returns no rows?
    Thanks,
    Andrew

    Hi Andrew
    Have you considered modifying your chart to use a series with the "Query source type" of "Function returning SQL Query"
    Have a look at
    Re: Flash chart - multiple series - no display when some series empty
    My response on that thread may help. I'd be interested to know if this approach improves the performance.
    Kind regards
    Simon Gadd

  • Chart legend problem

    I have multiple pie charts displayed on the same page. I would like to maintain consistent legend across all the graphs as below.
    0 - 10 % - Red
    11- 20% - Green
    21 - 30% - Blue
    31- 40% - Black
    41-50% - Yellow
    some of the charts may not certain ranges as mentioned above. I always want to show consistent colors in the legend, instead of apex choosing the colors for the chart randomly. that means, when the values are 11- 20% it's green, 31-40% is always black, if those ranges are avaialble. Is there way to enforce such color shcme/legend to SVG charts?. any ideas are appreciated.
    thanks in advance,
    Surya

    any ideas are appreciated.

  • Bubble chart legend problem

    Hello.
    I have problem with bubble chart the problem is that in chart legend appear the same number of object what bubble in chart e.g. if chart have 5 bubble then legend also have 5 object.
    What do I want to obtain is that in chart appear bubble which have different color (color depends on condition) and legend relate only colors. For example if chart have 4 bubble 3 - red and 1 - green then in legend appear only two position which relate green and red color (now appear 4 object three about red and one green).
    Can any one tell me how to resolve this problem?

    I already did this I added three condition (three colors red, green and yellow) in field "Value of" I choosed "is equal to" unfortunately it didn't help.
    Maybe I joust try to describe what I want to show in this chart.
    Suppose I have table with four columns u201Cdateu201D, u201Camount (number type)u201D, u201Csize (number type)u201D, u201Crisku201D (text type) now where this value appear on chart:
    - date is x axis
    - amount is y axis
    - size is a bubble size
    - risk will be bubble color
    Now I have 3 kind of risk u201CLowu201D (green color), u201CMediumu201D (yellow color) and u201CHighu201D (red color).
    Now in my data base I have table with record:
    - u201C11-11-2009u201D, u201C1u201D, u201C2u201D, u201CMediumu201D
    - u201C12-11-2009u201D, u201C2u201D, u201C1u201D, u201CMediumu201D
    - u201C13-11-2009u201D, u201C1u201D, u201C1u201D, u201CHighu201D
    - u201C14-11-2009u201D, u201C3u201D, u201C3u201D, u201CLowu201D
    - u201C15-11-2009u201D, u201C1u201D, u201C1u201D, u201CLowu201D
    Ok so now In My chart I should have 5 bubble and in legend three value (green, red, yellow) but in this case I always have five (the same number what record in table).
    Sorry if this example is not clear.

Maybe you are looking for

  • Connection drop iMac to Apple TV - OSX Lion

    Hello. Hope someone might have a solution. Ever since i changed to OSX Lion i have had a really irritating bug with my Wifi. While browsing, downloading and doing everyday stuff my connection is fine. However when streaming movies and tv-shows to my

  • Error in XML parsing. Im i missing something obvious.

    I am new to XML and i cant seem to be able to iterate through the xml response. Here is the relevant code      QName qName = new QName( "http://www.ros.ie/schemas/customs/collectresponse/v1", "MailboxCollectResponse" );                           //cr

  • IBot Issues - SA System - Use filters in IBot

    Dear OBIEE Experts, We are working on an OBI EE problem, which is the below one. We have parent report in OBI answer with out any condition. We created an iBot and we would like to apply a filter condition with out disturbing the parent report and se

  • Integration with POS to SAP 4.7 / ECC 6.0

    Hi Experts, Is it possible to use POS with SAP 4.7 or ECC 6.0 without using IS Retail. If possible can you please explain how can we do that ? Thanks Christine

  • Without an Apple product.

    Hello. I had a question. I downloaded Itunes to my Acer computer, but my apps won't work. Is it only for Apple products? Can I get it to work on my computer? I am trying to get Ocho to work. Whenever I click on it, it outlines in blue and won't open.