Pie Chart and legend symbols

Hi forum,
who can help me to customize legend symbols in pie chart?
Thanks in advanced

Look at the last lines in caspian.css
.pie-legend-symbol.chart-pie {
    -fx-background-radius: 8px;
    -fx-padding: 8px;
    -fx-border-color: null;
}You can provide your own css for pie-legend-symbol.chart-pie to style the symbol how you like.
If you need more control, do a css lookup after the chart has been shown on the stage:
Set<Node> items = chart.lookupAll("Label.chart-legend-item");
int i = 0;
// these colors came from caspian.css .default-color0..4.chart-pie
Color[] colors = { Color.web("#f9d900"), Color.web("#a9e200"), Color.web("#22bad9"), Color.web("#0181e2"), Color.web("#2f357f") };
for (Node item : items) {
  Label label = (Label) item;
  final Rectangle rectangle = new Rectangle(10, 10, colors);
final Glow niceEffect = new Glow();
niceEffect.setInput(new Reflection());
rectangle.setEffect(niceEffect);
label.setGraphic(rectangle);
i++;
Here is a full example: https://gist.github.com/1422628                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • Pie Chart with Legend

    Hey Experts,
    I have a small issue but cannot seem to find the solution. I have a pie chart with legends which I want to show side by side (horizontally). First pie chart and then legends. My requirement is that when the window is resized, the pie chart should also resize. I am able to show the chart and legends horizontally but when the legends list is long, the pie chart is always aligned in the center vertically. I tried setting all properties such as verticalAlign = "top", verticalCenter = "false", tried putting pie chart and legends in a separate VBox but nothing seems to work. Below is the code snippet.
    I believe others would have faced this problem. Can someone help?
    <mx:HBox width="100%" height="100%" verticalAlign="top" verticalCenter="false">
         <mx:VBox width="100%" verticalAlign="top" verticalCenter="false">
              <mx:PieChart id="pieChart" width="100%" height="100%" showDataTips="true" minWidth="200" minHeight="200" verticalCenter="false"/>
         </mx:VBox>
         <mx:VBox width="100%" verticalAlign="top" verticalCenter="false">
              <mx:Legend width="100%" height="100%" dataProvider="{pieChart}"/>
         </mx:VBox>
    </mx:HBox>

    Hi Dajji,
    Here is the code which resolves the problem...
    Note: In the code below I have removed the percentage width and height for PieChart.....that resolves the problem.....but the thing here is as you resize
    your browser window the piechart width and height will not change accordingly...? Do you need PieChart to change its dimensions as your browser window
    resizes...???
    However if you specify width="100%" and height="100%" for PieChart you never gonna acheive the PieChart to be vertically alined to top.....why because
    as you specified width="100%" and height="100%" for PieChart it occupies the total dimensions of the VBox but the actual visible portion dimensions are
    less... because within the VBox you also have the legends so Flex will assign the sizes proportionately....for PieChart and Legends..
    Hope you got my point...So you should remove the width="100%" and height="100%" for PieChart then you can acheive what you needed...
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the PieChart control. -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="100%" width="100%">
        <mx:Script>
            <![CDATA[         
            import mx.collections.ArrayCollection;
            [Bindable]
            private var medalsAC:ArrayCollection = new ArrayCollection( [
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);
            private function displayGold(data:Object, field:String, index:Number, percentValue:Number):String {
                var temp:String= (" " + percentValue).substr(0,6);
                return data.Country + ": " + '\n' + "Total Gold: " + data.Gold + '\n' + temp + "%";
            ]]>
        </mx:Script>
        <mx:Panel title="Olympics 2004 Medals Tally Panel" height="100%" width="100%" layout="horizontal" verticalAlign="top">
               <mx:VBox verticalAlign="top" height="100%" width="100%">
                 <mx:PieChart id="chart"
                     showDataTips="true"
                     dataProvider="{medalsAC}">         
                     <mx:series>
                         <mx:PieSeries
                             nameField="Country"
                             field="Gold"
                             labelFunction="displayGold">
                         </mx:PieSeries>
                     </mx:series>
                 </mx:PieChart> 
               </mx:VBox>                 
             <mx:Legend dataProvider="{chart}"/>
        </mx:Panel>
    </mx:Application>
    Thanks,
    Bhasker Chari

  • Pie chart with legend as a column

    Watch the Keynote '09 Video Tutorial "Create and Edit a Chart": http://www.apple.com/iwork/tutorials/#keynote-chart . A pie chart is shown where the legend appears as bullets arranged in a column. When I try to create a pie chart, the legend appears as bullets arranged in a row. How to switch the legend from a row format to a column format, as in the video?

    Hi Pion - I worked on those videos, so I've got your answer.
    You can select a chart's legend separately - click on it until you see bounding boxes just for the legend - then drag the left bounding box towards the right, and the numbers will become a column.
    Let's say you wanted that layout for future charts in that presentation. First arrange your legend as you would like it, then click once on the chart itself to select the chart (the legend will be de-selected - no problem). Then go to *Format - Advanced - Set Chart and Legend Geometry for All Masters*. The relationship between the legend and the cart will then stay the same.

  • Top 10 chart and legend problem

    Post Author: training2go
    CA Forum: Charts and Graphs
    Hello,
    I am using CR for Visual Studio 2005.I create a top 10 chart with a legend. The chart is in the group header 1b section and I'm using the underlay option so that the chart is to the right of the detail records.
    The chart and legend have 2 problems:
    1. The chart displays entries that are not in the detail records. The top 2 pie slices are for amounts not in the detail records or in the legend
    2. The percents in the legend are not correct.The first 3 entries in the legend are:
    $5,879.70 18.1%$5,219.55 16.1%$10,886.79 11.2%I would think that the $10K amount would have the largest percent and the $5879 nbr would have the lower percent.I've looked every place that I can think of to find out what is causing this, but I'm not having any luck.I also tried putting the chart in the group footer section, but the results are the same.I've also noticed this in CR XI. I don't know if I'm doing something wrong or if this is a bug.Any help would be greatly appreciated.Thank you.

    Post Author: training2go
    CA Forum: Charts and Graphs
    I've still been trying to get this to work or at least figure out what I'm doig wrong, but so far I haven't had any luck, so I'm hoping someone can help me.

  • Marker shapes differ between chart and legend (JRC).

    Post Author: bernander
    CA Forum: JAVA
    I'm using the current JRC (Java Reporting Component) to display a chart on a web page (using CrystalReportViewer).The chart markers are of one shape but many colors. The legend shows MANY DIFFERENT shapes (and many colors).When I display the chart using Crystal designer, but the chart and legend stick to a single shape.Is there a way around this, or is it simply a bug in the current JRC?

    Forgot to mention: lag only applies to displaying JPanel containing graphs. Displaying "welcome" JPanel, which contains only a JLabel, is almost instantaneous.

  • Bar of Pie Chart and Age Population Chart ?

    Hi,
    I've got the last version of numbers and I'am asked for an assignement to do a Bar of Pie Chart and an Age Population Chart.
    I tried everything and searched on the internet but couldn't manage to find what I'm looking for.
    Could anyone explain how to do those ?
    Thanks

    Hi Vic,
    So "Bar of Pie" wasn't a typo! Looks like Jerry (and I) had a different interpretation of what you were trying to do.
    What you have there is two separate charts, using two separate (but related) sets of Data.
    The Pie chart uses the data listed on the table to the left below—individual numbers for the pets whose count is three or greater, and a grouped count for the others.
    The Stacked Bar chart uses a separate data set, listed on the second table—the individual counts for those pets represented fewer than three times each.
    Here's a variation.
    Charts are using the default colours as assigned by Numbers.
    See the Numbers '09 User Guide for details on reformatting the charts.
    Regards,
    Barry

  • Flash Chart : Percentage values in the pie chart and  values in the legend

    Hi All,
    Query is :
    SELECT null link
    ,GN.region Region
    ,ROUND(100*ratio_to_report(COUNT(DISTINCT GN.submittedbyemail)) over (),2) value
    FROM goodnews_stories GN
    GROUP BY GN.region
    I use the above query to display the flash pie chart percentage values.
    The values are displayed in percentage in legend as well as on the chart.
    I need to display the values in the legend and percentage values in the chart.
    How this can be achieved ?
    Regards,
    Archana

    Hello,
    Can we do this using apex? I have observed in legend as well as on chart it displays the same values which are generated by the sql query.
    Regards,
    Archana

  • No data in Active sessions pie-chart and availability is 0%

    Hi All,
    Does anyone know why my Enterprise Manager cosole in Oracle 10g installed on windows xp professional is not showing any data? Availabilty is always 0% for the instance ORCL and the active sessions pie-chart is always showing 0.01 since May 17,2005.
    Can anyone tell me how to configure EM so that instance ORCL and the active sessions start showing data again?
    Thanks

    Hi,
    Kindly activate the data request. Post that, Under "request available for reporting" a symbol will appear which means that the data has been moved to Active table and is available for reporting at further levels.
    And you can then check for contents in the active table of the DSo, you should get the records.
    Change log: Contains the change history for the delta update from the DataStore object into other data targets, such as DataStore objects or InfoCubes. It makes sense in case of delta uploads.
    Regards,
    hemlata

  • 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

  • Create Pie Chart and Vertical bar chart using report builder 3.0 with sharepoint custom list

    Hi All,
    I have a client requirement to create reports which should show the graphical representation of SharePoint Custom List data. The reports are Month wise and YTD. Also i have to create dashboard.
    For creating reports, i have heard about Report Builder and SSRS. I have SQL server 2008r2 and installed report builder 3.0 but i am not aware of creating reports(KPI, Pie Chart, Vertical bar, etc.,) with sharepoint customlist.
    Can some one please help me on this.
    MercuryMan

    Here is some information about using the SharePoint List Data source with SSRS/Report Builder/BIDS:
    http://www.infotoad.com/blog/post/2012/10/11/using-a-sharepoint-list-connection-type-as-a-data-source-for-reporting-services.aspx
    http://technet.microsoft.com/en-us/library/ee633650.aspx
    http://www.codeproject.com/Articles/24469/SQL-Reporting-Services-data-from-SharePoint-lists
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Interactive Bar/pie chart and line graph, data from excel/text file -urgent

    Hi,
    I have a huge data in excell sheet which keeps updating every month. Data basically consists of service provider and there respective subscribers from various regions of the country over the years. The requirement is to give the viewers an interactive page where in they can make various combinations and can compare, cross examine data according to thier choice.
    We want the pie chart / bar graph or line graph to be created on the fly according to the combination made by the user.
    The site is hosted on a red hat linux server. how can a connection to the excel spreadsheet be made or is it possible to read from the text file if the entire data is exported to a text file.
    Is there any ready made tool/code available which can be customised according to the need.
    Thanx in advance
    Regards
    Prakash

    I certainly wouldn't pay for the graphing package at the previous link. check out http://www.object-refinery.com/jfreechart/ for a free, open-source, much better looking graphing package.

  • Automatic Fill colors for Report Builder pie charts and graphs are too repetitive and hard to differentiate

    I have pie charts or other graphs that show multiple results (7-20).  I set the "fill" colors to Automatic so that the results are dynamic (I don't want to specify a color for each result because I will then be limited that those results--I
    prefer it to be dynamic).
    I noticed that once you get above 4 or 5 results, no matter which palette is used, the "automatic" colors are so closely similar that it is hard to differentiate which color pertains to which result (group).  For example, you could have a
    reports that breaks the results into age groups like 1-18, 19-21, 22-25, 26-30, 31-41, 41-50, 51-65, 66-80, and 81+.  By the time you review the results, there's likely to be 3 pairs of colors (or more) that are so closely similar that you can't
    tell them apart (2 shades of yellow, 3 shades of blue, 2 shades of orange, or green, or teal, or purple or whatever).
    Is there a way to use Automatic for the color scheme (I don't care which color pertains to which category) but also specify to not use colors that seem to bleed together (so that someone viewing the report can actually tell the difference)?  Using SSRS
    2008 Report Builder, if it makes a difference.

    Hi JNehman,
    Reporting Services provides a list of predefined, built-in palettes that you can use to define a color set for series on your chart. All built-in palettes contain between 10 and 16 color values. You cannot extend the built-in palette to include more colors,
    so if you need more than 16 colors, you must define a custom palette.
    A custom palette let you add your own colors in the order you want them to appear on the chart. A custom palette is especially helpful if the number of series in your chart is unknown at design time. For more information, see
    Define Colors on a Chart Using a Palette (Report Builder and SSRS).
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Copy Chart and Legend Together

    Hi,
    Just tinkering with Numbers. Can anyone advise how to copy a chart and its legend to a new app? I am copying a chart in numbers but when I paste it into Mail the chart-legend is not pasted. I have tried using Cmd to select both objects but no joy.
    Appreciate any advice,
    Thanks,
    Mickey

    Question asked and responded several times.
    Here is my own response updated :
    Select the chart and its legend.
    Group the objects.
    Copy the group in a Pages document, export this document as RTF.
    Control click the .rtfd file which will be created.
    Select "Show Package Contents".
    You will see the content of the doc. One file is a PDF containing the chart with its legend.
    Some times ago, I wrote an AppleScript automating the process.
    Go to my iDisk:
    <http://public.me.com/koenigyvan>
    Download
    For_iWork:iWork '09:forNumbers09:savechart.zip
    Expand it,
    double click on "saveChart.applescript"
    Read the given explanations and apply them.
    Yvan KOENIG (VALLAURIS, France) dimanche 25 avril 2010 18:09:31

  • Problem with Pie chart and Hierarchy

    I have to display a Pie chart according to a hierarchy.
    The top node claims half of the chart.
    <u>A hierarchy for example</u>:
    Division A            450
       Department A1  100     
       Department A2  150
       Department A3  200
    The Pie chart  is divided to 4 parts (instead of 3), where Division A  takes 50%.
    I don’t want Division A to be seen in the chart.
    The best solution would be if WAD could ignore the first category.
    Thanks and best regards,
    Sigal.

    In WAD, mark the SUPPRESS_OPENHIERARCHIENODES parameter of the Pie Data Provider.

  • Proportional pie charts and annotation

    Hi,
    I have Numbers to help me make colourful, etc. graphs for inclusion in my MSc dissertation. I am using pie charts to show annual comparisons between common forms of disposing of waste. Ideally, I'd like the pie chart to show the amount of hazardous waste produced per annum, i.e. the larger the amount produced, the larger the pie chart. Other than doing it manually, by eye, can Numbers do this?
    Finally, when some of the fractions are small, instead of showing, say <1%, it will say 0%. Can I alter the labelling of the pie chart's slices?
    Many thanks - and I hope that this makes sense!
    Simon

    Axtron,
    Not seeing your available data, the only thing to go by is the image that comes to mind. Pie charts are excellent for depicting parts of the whole, so your concept of showing all the various waste materials produced in a year broken into percents works well. The pie charts will do the percents for you. Perhaps grouping a few waste types with small amounts and labeling them "All Others" would work.
    To show comparisons of successive years would require a pie chart for each year. One would scan across the row of charts and see certain types of waste were increasing or decreasing percent-wise over a period of time. But remember, each chart has to be the same size so as not to distort the data.
    If you are interested in showing increases and decreases in quantities of the various waste types over a period of time, perhaps a line or bar chart would be more effective. As a matter of fact, you could use either of these to show the percents of the pie chart as well. Once you have a table of data you can experiment with each type of chart to see which best emphasizes your point.
    pw

Maybe you are looking for

  • Additional Tab in CRMD_BUS2000126 using EEWB

    Dear Experts, I have successfully created an additional tab in Maintain Activities using EEWB. The fields display. I can write to them and read from them just fine. Now the user wants the new tab to display conditionally. In our case, the display of

  • Want Image Capture to automatically open instead of iPhoto

    When I upload photos from my camera, iPhoto automatically opens. How can I set up Image Capture as the default, instead? Thanks.

  • Plug-Ins for Safari and Firefox

    I'm a new MAC owner (as of last week as a matter of fact) so bear with me....... I had to download Firefox since I got the message that Safari didn't support the new Yahoo Mail Beta. Then I decided to check out my MACBook Pro's video capabilities by

  • Envelopes on C6380 - Paper miss match

    Hi, I am trying to print an envelope from Microsoft word with the Photosmart C6380. I load the envelope into the main paper try and start printing... once the printer has pulled the envelope half way in an error message shows up on the screen saying

  • No Checkbox For Head of Organizational Unit

    Dear Experts, I customized one relation which copied from A003/B003 and add in evaluation path. I can use the relation and create a position in PPOME. However, there is no checkbox for Head of Organizational Unit. Are there anything I didn't do in IM