Dynamically Labeling a pie chart (arc2d_pie)

Can Somebody guide me how to Dynamically labling a pie chart inside or outside of it.Atpresent I am using rectangle color-code for labling at the top and left side of arch2d but its very confusing as the pie segments grows in number .I am submitting my source code for the pie chart for your reference.You are requested to please guide me with some concrete example as soon as possible .Thanks in advanceimport java.io.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.util.Random;
import java.sql.*;
import java.math.BigDecimal;
public class pie2d extends JPanel{
     Connection con;
     Statement stmt;
     Vector vc,conVector;
     int arraincrement,sum,pieMinusAngle,IntegerToInt;
     double sumAngle,allAngleSum;
     public void pie(Graphics g){
          try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String connection_string="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=D:\\bhanu\\bhanu.mdb;DriverID=22";
con=DriverManager.getConnection(connection_string);
stmt=con.createStatement();
catch(Exception er){
     System.out.println("could not connect to database"+er);
vc=new Vector();
conVector=new Vector();
try{
     ResultSet res=stmt.executeQuery("select contractor,count(contractor)as totalcon from daily group by contractor");
System.out.println("Result set executed");
while(res.next()){
     String tovector=res.getString("totalcon");
     String contractor=res.getString("contractor");
     conVector.add(contractor);
     int stringToInt=Integer.parseInt(tovector);
     vc.add(stringToInt);
catch(Exception e){
     System.out.println("Result set error"+e);
          Graphics2D g2d=(Graphics2D)g;
          Random generator = new Random();
          g2d.setFont(new Font("Arial",Font.BOLD,15));
     int vectorsize=vc.size();
     for(int i=0;i<vectorsize;i++){
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
     int IntegerToInt=objToInt.intValue();
sum=sum+IntegerToInt;
     int pieAngle=360;
     for(int i=0;i<vectorsize;i++){
     System.out.println("sum is now :"+sum);     
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
      IntegerToInt=objToInt.intValue();
     double DivideAngle=(double)((360/sum)*IntegerToInt);
     allAngleSum=allAngleSum+DivideAngle;
     if(allAngleSum<360){
     double sumCalculate=(360-allAngleSum)/vectorsize;
     for(int i=0;i<vectorsize;i++){
     System.out.println("sum is now :"+sum);     
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
      IntegerToInt=objToInt.intValue();
     double DivideAngle=(double)((360/sum)*IntegerToInt)+sumCalculate;
     Object contractorObj=conVector.elementAt(i);
     String contractor=(String)contractorObj;
     int Rnewcolor=generator.nextInt(255);
     int Gnewcolor=generator.nextInt(255);
     int Bnewcolor=generator.nextInt(255);     
     g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
     g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
     sumAngle=sumAngle+DivideAngle;
     String intToString=Integer.toString(IntegerToInt);
     if(i<7){
     g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
     g2d.drawString(intToString,i*73,100);
     g2d.drawString(contractor,i*73,120);//top horizontal
     else{
          g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
     g2d.drawString(intToString,55,i*42);
          g2d.drawString(contractor,75,i*42);
     if(allAngleSum>360){
     double sumCalculate=(allAngleSum-360)/vectorsize;
     for(int i=0;i<vectorsize;i++){
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
      IntegerToInt=objToInt.intValue();
     double DivideAngle=(double)((360/sum)*IntegerToInt)-sumCalculate;
     Object contractorObj=conVector.elementAt(i);
     String contractor=(String)contractorObj;
     int Rnewcolor=generator.nextInt(255);
     int Gnewcolor=generator.nextInt(255);
     int Bnewcolor=generator.nextInt(255);     
     g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
     g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
     sumAngle=sumAngle+DivideAngle;
     String intToString=Integer.toString(IntegerToInt);
     if(i<7){
     g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
     g2d.drawString(intToString,i*73,100);
     g2d.drawString(contractor,i*73,120);//top horizontal
     else{
          g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
     g2d.drawString(intToString,55,i*42);
          g2d.drawString(contractor,75,i*42);
     sum=0;
     sumAngle=0;
     allAngleSum=0;
     try{
          stmt.close();
          con.close();
     catch(Exception e){
          System.out.println("Could not close connections"+e);
     public void paintComponent(Graphics g){
          super.paintComponent(g);
          pie(g);
}

Can Somebody guide me how to Dynamically labling a pie chart inside or outside of it.Atpresent I am using rectangle color-code for labling at the top and left side of arch2d but its very confusing as the pie segments grows in number .I am submitting my source code for the pie chart for your reference.You are requested to please guide me with some concrete example as soon as possible .Thanks in advanceimport java.io.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.awt.image.*;
import java.util.Random;
import java.sql.*;
import java.math.BigDecimal;
public class pie2d extends JPanel{
     Connection con;
     Statement stmt;
     Vector vc,conVector;
     int arraincrement,sum,pieMinusAngle,IntegerToInt;
     double sumAngle,allAngleSum;
     public void pie(Graphics g){
          try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String connection_string="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=D:\\bhanu\\bhanu.mdb;DriverID=22";
con=DriverManager.getConnection(connection_string);
stmt=con.createStatement();
catch(Exception er){
     System.out.println("could not connect to database"+er);
vc=new Vector();
conVector=new Vector();
try{
     ResultSet res=stmt.executeQuery("select contractor,count(contractor)as totalcon from daily group by contractor");
System.out.println("Result set executed");
while(res.next()){
     String tovector=res.getString("totalcon");
     String contractor=res.getString("contractor");
     conVector.add(contractor);
     int stringToInt=Integer.parseInt(tovector);
     vc.add(stringToInt);
catch(Exception e){
     System.out.println("Result set error"+e);
          Graphics2D g2d=(Graphics2D)g;
          Random generator = new Random();
          g2d.setFont(new Font("Arial",Font.BOLD,15));
     int vectorsize=vc.size();
     for(int i=0;i<vectorsize;i++){
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
     int IntegerToInt=objToInt.intValue();
sum=sum+IntegerToInt;
     int pieAngle=360;
     for(int i=0;i<vectorsize;i++){
     System.out.println("sum is now :"+sum);     
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
      IntegerToInt=objToInt.intValue();
     double DivideAngle=(double)((360/sum)*IntegerToInt);
     allAngleSum=allAngleSum+DivideAngle;
     if(allAngleSum<360){
     double sumCalculate=(360-allAngleSum)/vectorsize;
     for(int i=0;i<vectorsize;i++){
     System.out.println("sum is now :"+sum);     
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
      IntegerToInt=objToInt.intValue();
     double DivideAngle=(double)((360/sum)*IntegerToInt)+sumCalculate;
     Object contractorObj=conVector.elementAt(i);
     String contractor=(String)contractorObj;
     int Rnewcolor=generator.nextInt(255);
     int Gnewcolor=generator.nextInt(255);
     int Bnewcolor=generator.nextInt(255);     
     g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
     g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
     sumAngle=sumAngle+DivideAngle;
     String intToString=Integer.toString(IntegerToInt);
     if(i<7){
     g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
     g2d.drawString(intToString,i*73,100);
     g2d.drawString(contractor,i*73,120);//top horizontal
     else{
          g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
     g2d.drawString(intToString,55,i*42);
          g2d.drawString(contractor,75,i*42);
     if(allAngleSum>360){
     double sumCalculate=(allAngleSum-360)/vectorsize;
     for(int i=0;i<vectorsize;i++){
     Object getInt=vc.elementAt(i);
     Integer objToInt=(Integer)getInt;
      IntegerToInt=objToInt.intValue();
     double DivideAngle=(double)((360/sum)*IntegerToInt)-sumCalculate;
     Object contractorObj=conVector.elementAt(i);
     String contractor=(String)contractorObj;
     int Rnewcolor=generator.nextInt(255);
     int Gnewcolor=generator.nextInt(255);
     int Bnewcolor=generator.nextInt(255);     
     g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
     g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
     sumAngle=sumAngle+DivideAngle;
     String intToString=Integer.toString(IntegerToInt);
     if(i<7){
     g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
     g2d.drawString(intToString,i*73,100);
     g2d.drawString(contractor,i*73,120);//top horizontal
     else{
          g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
     g2d.drawString(intToString,55,i*42);
          g2d.drawString(contractor,75,i*42);
     sum=0;
     sumAngle=0;
     allAngleSum=0;
     try{
          stmt.close();
          con.close();
     catch(Exception e){
          System.out.println("Could not close connections"+e);
     public void paintComponent(Graphics g){
          super.paintComponent(g);
          pie(g);
}

Similar Messages

  • Labels in Pie Charts

    Hi,
    I have two questions about the behavior of labels in pie charts:
    Question 1:
    When I format pie chart labels as 'NameandValue', the result in the label pie chart always appears as 'Value' and then 'Name', how can I change this?
    Question 2:
    I have several pie charts, that overlap labels, how can I customize charts in order for that never to occur?

    In order to achieve that you will need to change the pcxml files controlling the pie chart (since the chart is actually produced by the Corda engine)
    They are in
    \\OracleBI\web\app\res\s_oracle10\popbin
    and for oc4j in:
    \\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\popbin
    I don't have all the variables available off the top of my head, but John posted a quite exhaustive list:
    http://obiee101.blogspot.com/2008/01/obiee-xy-and-data-in-mouse-over-label.html
    Cheers,
    Christi@n

  • Data labels on pie chart

    Hi,
    I want both the series label and % value to display on my pie chart, but what i want is % value to be displayed inside pie slices and series label outside the pie slices, right now we have option to do either of the one
    my Report Builder is 9.0.4.0.33
    can anybody help me regarding this.
    Thanks.

    hello tammy,
    i just created this request in the idea place
    enhance pie chart data labels : View Idea
    i was just thinking (yes, you should be afraid - smile)
    it would make life much easier if there was a link in the forum message toolbar that linked to the submit idea form in the idea place and included the link for the message thread from here at the bottom of the request. that way the developers could also see what other people think about the issue. what do you think?

  • Missing labels on pie charts

    Hi All,
    We are making use of pie charts and noticed that sometimes the labels are not being displayed in the charts for certain fields. Upon hovering over the field, the relevant % and data series value are displayed correctly, so there are definitely no issues with data here. Was wondering if anybody has encountered this.. Any thoughts on why this could be happening?
    Thanks,
    Prachi

    Hi Prachi,
    I think this is related to the size of the graph... If you make it a little bit bigger, you'll probably see the missing labels (at least that's what happened to me).
    Cheers,
    Cris

  • How to add dynamic visibility between pie chart and 2 bar charts?

    I have 3 section in pie chart. If i click on one section according bar chart have to appear...

    Hi Riaz,
    your subject-line and query seems to be different, please elaborate me the question properly so that i can explain you in clear in a single reply.
    For the query you have posted bar chart based on pie selection, if i understood your question clear. Goto File menu-->samples-->user guide samples-->Chart-Insertion will show the same what you have asked.
    Hope this Helps!!!
    --SumanT

  • Labels in pie charts overlap when the slice is very thin

    Hi,
    I have Crystal Reports 2008 and I am using it to create some dynamic charts but in some cases (when the slice of the pie is really thin) the labels of the pie slices overlap. It is a customer's requirement to have labels (legends) on each slice and using the option "Auto-Arrange" doesn't work since the font becomes really tiny and the customer doesn't like it. Could anybody please help?
    Thanks a lot!

    Too much data

  • Dynamic Pie Chart: Counting the number of instances for each value

    Hello my name is Tim and I am at a roadblock concerning a chart for a dashboard design.
    I have a list with two fields:
    Platform and Status. The list is customized in InfoPath. The
    Platform field is located on the form as a drop-down menu with 6 entries.
    Status is a choice field with 3 selection that is updated through the lifespan of the project (once item created, it is updated to "In process", once the project is closed, the field is updated to "closed."
    My hurdle is viewing these dynamically in a Pie Chart. I am  trying to display the number of project's "In process" for each Platform. So, if Platform A has 6 projects "In process" and Platform B has 3 projects "In process"
    how can this be displayed in a pie chart?
    At the moment, I figured there are two options: Chart View WebPart or importing an Excel  worksheet.
    Any ideas or solution on how to accomplish this?
    -Tim Dempsey

    Three options:
    1. Create a list that holds your statuses. Then in your original list, create a lookup to the status list. In your status list, make a lookup to the lookup. This creates a circular reference which, for whatever reason, returns a count. You can then connect
    a chart web part to this. Repeat for the other column.
    2. Go to your sharepoint list and export to spreadsheet. Save the file. This is a query file that you can use as a data connection. From that file, set it to auto-update and then create a chart from a pivot table. Then use Excel Services Web Part to display
    the file.
    3. The other option is to use Google Charts API. Connect to the list, run some jQuery and JavaScript and then export out a chart. Pretty cool tool.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • Pie chart labels prepended with "@" symbol

    Hello
    I have a pie chart and it has two values, each of which is a formula
    When I view the Pie chart the Data labels and legend are prefixed with @
    The Data Value formula name is Open Online, so the data lable on the Pie is @Open Online, as it the legend
    It does not look great on the chart
    is there any way to use a forumla as a data value in a chart, but to NOT have the @ symbol as part of the name?
    This chart is developed in Crystal Reports 2008 SP2
    I am using a Pie Chart at the moment, the Pie has 1 On Change Of and 2 Data Values
    Best regards
    Patrick

    I believe if you select the label object on the design page and right-click, you will have the option to edit the label properties.
    Fuskie
    Who notes you can hard code a value but not alter any dynamic values...

  • Keep pie chart from shrinking due to long labels outside of chart

    I was wondering is there a way to keep my pie chart from shrinking when I have labels outside of the chart that are long?  Is there an option to wrap the labels, or dynamically shrink the font size of the labels, or both, so that my pie chart doesn't
    have to be shrunk?
    Please provide details on how this is done if you know how.  Thanks.

    Hi jiwalkersm,
    According to your description, you want to avoid your pie chart shrinking when the label outside is too long. Right?
    In Reporting Service, if we want to always keep the pie chart size, we can set Docks into Default in Legend Properties, and let the legend not to show outside of chart. This will keep the position and size of the chart, but the legend will stay above the
    chart which is not good for view. So we try to use expression to set font size in Legend Properties. However, we don’t have any function which can make the label wrapped. So we can only set font size based on the length of the label (For example: =IIF(Len(Field!Name.Value)>10,”5pt”,”8pt”)).
    If this workaround still can’t be effective, we suggest you delete the legend, and create a tablix next to the chart, put the data into it.
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
      

  • Buisness graphics dynamic PIE chart event id

    HI all,
    I'm trying to create dynamic PIE chart :
    Link to sdn document *
    First I declared in the context node a table ( 0…n )
    PIE – 0…N  with attributes :
    Categorty – type string
    Series – type i
    Then I'm creating the business graphics :
    DATA:lr_graph TYPE REF TO cl_wd_business_graphics,
    lr_cat TYPE REF TO cl_wd_category,
    lr_series TYPE REF TO cl_wd_simple_series,
    lr_container TYPE REF TO cl_wd_uielement_container,
    lr_flow TYPE REF TO cl_wd_flow_data.
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lr_graph = cl_wd_business_graphics=>new_business_graphics(
    bind_series_source = 'NODE_DYN'
    chart_type = cl_wd_business_graphics=>e_chart_type-pie
    height = 340
    width = 750
    id = 'GRAPH' ).
    lr_flow = cl_wd_flow_data=>new_flow_data( element = lr_graph ).
    lr_container->add_child( lr_graph ) .
    wd_this->value_cs ?= lr_graph.
    wd_this->mr_view ?= view.
    Now I'm creating the category and series :
    wd_this->value_cs =? Lr_graph
    wd_this->mr_view ?= view.
    Series :
    DATA: lr_bgr_ss TYPE REF TO cl_wd_simple_series.
    lr_bgr_ss = cl_wd_simple_series=>new_simple_series(
    bind_value = ‘NODE_DYN.SERIES’
    label = ‘Series_1’
    event_id = ‘Series_1’
    id       = ‘Series_1’
    view = wd_this->mr_view ).
    Wd_this->value_cs->add_series( lr_bgr_ss ).
    Category :
    DATA: lr_bgr_cs TYPE REF TO cl_wd_category.
    lr_bgr_cs = cl_wd_category=>new_category(
    view = wd_this->mr_view
    event_id = ‘Series_1’
    id       = ‘Series_1’
    bind_description = 'NODE_DYN.CATEGORY').
    wd_this->value_cs->set_category( lr_bgr_cs ).
    Now I'm binding the data :
    Data : ls_pie type wd_this->element_pie.
    Data : lt_pie type table of element_pie.
    ls_pie-category = 'test_category1'.
    ls_pie-series = '34'.
    Append ls_pie to lt_pie.
    ls_pie-category = 'test_category2'.
    ls_pie-series = '73'.
    Append ls_pie to lt_pie.
    Data : lo_nd_pie type ref to if_Wd_context_node.
    Data : lo_el_pie type ref to if_wd_context_element.
    Lo_nd_pie = wd_context->get_child_node(
    Name = wd_this-> wdctx_pie.
    The above is the only way that I succeeded to create 2 categories for the pie chart but I cant isolate the event id for every category.
    I tried also to create another series with the same id and other event id but still got the same problem.
    Please suggest a solution for creating dynamic pie chart with event id for every category or series .
    Regards,
    Arie.

    Hi Rama,
    Thank you for your reply ,
    I added the BIND_EVEND_ID = 'NODE_DYN.SERIES'  and it worked fine.
    I'm trying now to get rid of the static context element.
    I've declared the following :
    DATA : NODE_INFO TYPE REF TO IF_WD_CONTEXT_NODE_INFO ,
                  STRUCT_TYPE TYPE REF TO CL_ABAP_STRUCDESCR ,
                  TABLE_TYPE REF TO CL_ABAPDESCR=>COMPONENT_TABLE,
                 COMP LIKE LINE OF COMP_TAB.
    COMP-NAME = 'CATEGORY'.
    COMP_TYPE ?= CL_ABAP_DATADESCR=>DESCRIBE_BY_NAME( 'STRING' ).
    APPEND COMP TO COMP_TAB.
    COMP-NAME = 'SERIES'.
    COMP_TYPE ?= CL_ABAP_DATADESCR=>DESCRIBE_BY_NAME( 'I' ).
    APPEND COMP TO COMP_TAB.
    STRUCT_TYPE = CL_ABAP_STRUCTDESCR=>CREATE( COMP_TAB ).
    NODE_INFO = WD_CONTEXT->GET_NODE_INFO( ).
    NODE_INFO = NODE_INFO->ADD_NEW_CHILD_NODE (
    NAME = 'NODE_DYN'
    IS_MANDTORY = ABAP_FALSE
    IS_MULTIPLE = ABAP_TRUE
    STATIC_ELEMENT_RTTI = STRUCT_TYPE
    IS_STATIC = ABAP_FALSE) .
    FIELD-SYMBOLS  <TABLE> TYPE TABLE.
    FIELD-SYMBOLS  <WA> TYPE WA.
    DATA : TABLE TYPE REF TO DATA.
    DATA : WA TYPE REF TO DATA.
    CREATE DATA TABLE LIKE TABLE OF STRUCT_TYPE.
    ASSIGN TABLE->* TO TABLE.
    TODO ?? - Add data to FS <TABLE>
    *Binding :
    DATA : DYN_NODE TYPE REF TO IF_WD_CONTEXT_NODE.
    DYN_NODE = WD_CONTEXT->GET_CHILD_NODE( NAME = 'NODE_DYN').
    DYN_NODE->BIND_TABLE( <TABLE> ).
    How do I append data to FS <table> with the relevant components ?
    Is there any  other efficient way to append the data and bind  ?
    Regards,
    Arie.

  • Pie Chart Labels - 5's turn into 6's at 100% zoom on screen but print OK

    I have a really odd problem; an application I developed that is changing the numerals on the labels of a pie chart.
    All 5's change to 6's.  This problem is occuring on multiple end user workstations.  It only displays incorrectly at 100% zoom level on the screen.  If they change the zoom level, or print the report, the numbers appear correct.
    I've put a screenshot in a photobucket in case anyone wants to see.  One is a .png and one is a (larger) .bmp.
    http://s1214.photobucket.com/albums/cc493/fohlinedata/
    Adding to the problem is that I'm unable to reproduce the issue, either on my dev. machine or on a test machine.
    The application was developed with VS 2005, and the setup program was created using the 2005 SP1 msm.
    I've tried searching to no avail, and I'm hoping someone has an idea on this one!

    Hello,
    That is very strange. I think it has to do with either Microsoft's USP10 or GDIPlus dll's.
    Try changing screen resolution or screen size and possibly the DPI settings to see if it corrects the problem.
    They may wan to update their Video card drivers also.
    What version of CR are you using? It may be resolved in some service or fix pack. The charting dll is from a third party so you may want to use [Modules |https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip]to verify they are all using the same runtime files also.
    Thank you
    Don

  • Pie Chart legend label icon

    Hi, is it possible to change the label icons of a Pie Chart legend? I have a pie chart with genre distribution % and would like to set the male and female genre icons instead of the color. 
    Thank you

    Hello Pedro,
    in general you can' t change the label icons in SSRS - I assume you mean with "label icons" the small colored rectangles indicating each of the sections in a pie chart. But I have a workaround for you: Simply not to use the build-in labeling mechanism
    of the chart, but to create an individual textbox with the needed symbols for your purposes. In that textbox you have to set an expression for showing the needed male or female symbols as Unicode-chars. There's a text function for that, I mean something like
    "=ChrW(&XXX)" is the appropriate expression. XXX has to be the character string of the Unicode-chartset, if you want e.g. the male symbol as an icon. Unfortunately, I can't post links, but it's quite easy to find via Bing or Google the needed
    chars or signs in the Unicode-Table (use e.g. "Unicode table" as search string and you find a great site for retrievaling chars and symbols in the Unicode-Table).
    Generally spoken, I wouldn't use pie charts at all, normally bar charts are the better choice in visualizing data - with bar charts it's easier to recognize skales than in a pie chart and you can often label bars in a direct way, so you don't need an extra
    legend.
    I hope I could help you, but feel free to ask me, if yo have further questions
    Robert 

  • Pie chart problem with label!

    Hello,
    I found this example of pie chart, I tried to use several pie charts but the label square move in some chart. It shows the square moved down when it uses the vi.
    I attached the example with 4 pie charts and sometimes it show the 4 sqaures and sometimes down one. Any way to fit it?.
    I would like to see some example with 3d pie chart. Do you know any example?.
    Thanks in advance!.
    Fred
    Solved!
    Go to Solution.
    Attachments:
    Pie Charts.vi ‏25 KB
    PieCreateChart.vi ‏13 KB

    Sorry guys!. i got it.
    Changing the first time call to comparison of For Loop = 0, so always start with the value fixed to draw the square.
    Thanks.

  • Pie chart label

    I have a pie chart and the region is limited in width.
    Some of the labels are a little long (even if they are abreviations) so that when they are at the center left or right of the pie chart, the labels are not enterily displayed.
    I was wondering if there was a way to display the label and value on seperate lines...
    I tried to add a chr(13) at the end of my labels in my sql query, but when the graph is displayed it shows something like this:
    "my lable"
    , "my value"
    I haven't find a way to remove the comma, it seems to be hard coded in an apex query...
    in the xml definition I can add a newline by doing this
    <text><![CDATA[{NAME}
    {VALUE}]]></text>
    but it only works for the hints label...
    btw, I'm using Apex 3.0.1.00.08
    anyone can help me?
    Thanks
    Max

    Hi Max
    Sorry for not getting back quicker - not sure if it's just me, but all the oracle servers seem to be dying right now!
    Anyway, the answer isn't pretty, but it will work:
    1 - In your select statement, change the LABEL value to be:
    labelfield || CHR(10) || TO_CHAR(valuefield) LABEL
    2 - In the custom XML section: Remove {VALUE} from the hints section
    3 - Also in custom XML, set show = "NO" in the values section
    Andy

  • Pie Chart Labels

    Hi,
    I am creating a pie chart. On the Pie chart I want to show the labels, values and percentage.
    I do not want to show Legend.
    Is there an option in Crystal Report that will allow me to show both Values and Percentage for each pie slice?
    Currently I can show either a value or a percentage. But I would like to show both side by side below the Pie label.
    I am using CR 2008, SP 2
    Please advise.

    hello all,
    you can show both the summary value and the percentage using the following method...
    say you have a pie chart that has an On Change Of by country. the summary value is sum of sales.
    1) ensure that there is a country group in the report
    2) create a new formula, "Chart Title" which is similar to
    {country field} + chr(10) +
    totext(Sum (, {country field}))
    3) change the pie chart On Change Of field to the Chart Title formula
    4) in Chart Options, change the Data Lables > Show Value to be a percentage
    cheers,
    jamie

Maybe you are looking for

  • No Data in Field Explorer

    Post Author: Ice_Berg CA Forum: .NET Hi... I'm currently using visual studio 2005 team edition and the built-in Crystal report.In my report, i use the Project data source (from ado.net, I created a view before in the database).In visual studio, when

  • Add a DB2 database file in different drive

    Dear all, I would like to add a DB2 database file in different drive which is added recently. eg: existing DB folders in drive H, now we need to add new data folder from drive J please help me on this step by step procedure, looking for the earliest

  • DELETE query takes long time more than 30 min

    Hi I have delete query as below.It takes 1300 sec to execute .Please let me know how to reduce the time of execution.I have indexes on both the columns jdoid,jdoversion of deletion. DELETE FROM SIT7016.DEVICEINTERFACE WHERE JDOID = :1 AND JDOVERSION

  • Sizing a logo for a client, when they aren't sure of intended usage

    Hello, Can anyone tell me a good "rule of thumb" when designing a logo for someone who isn't sure what size that they would want to use that logo in the future? If they don't know what print size they may want (business card size or larger sign size)

  • Error when trying to use 2.2 feedback utility

    Hi, When I try to create a comment on the evaluation copy of Application Express 2.2 I get this error: ORA-01400: cannot insert NULL into ("RAPTOR"."COMMENTS"."TESTER_ID") Error Comment submission failed. How do I get around this? Regards Pete Messag