How to add tooltip to pie chart?

Hello forum,
can I show a tooltip on mouse hover on pie of chart?
Thanks in advanced

Solved.
For each data:
Tooltip toolTip = new Tooltip();
toolTip.install(data.getNode(), toolTip);
toolTip.setText(data.getPieValue() + "%");

Similar Messages

  • How can we create dynamic pie chart in jsp

    hi im a new jsp programmer and i just want to know how can i create dynamic pie chart in jsp

    http://sourceforge.net/projects/jfreechart
    - Saish

  • How to add tooltip to images?

    How to add tooltips to images?

    OK, here is a more robust, more generic (any node) implementation.
    It would be nice if I could find a way to automatically insert the tooltips in the scene, but at time of node with tooltip creation, scene doesn't exist yet... Should have a post-layout event, perhaps. Or I can do that once on the onMouseEntered event, but then I have to find a way to get the scene holding a given node. Tried to iterate on Parents, but I can't cast a Parent to a Scene?
    Anyway, here is the new code:
    Tooltip.fx
    public class Tooltip extends CustomNode
      public var text: String;
      public var fill: Paint = Color.web('#EEFF00');
      public var stroke: Paint = Color.GREEN;
      var label: Label; // Make public to access textOverrun, textWrap, etc.?
      var back: Rectangle;
      override function create(): Node
        label = Label
          text: text
        back = Rectangle
          x: -2, y: -1
          width:  label.width + 4
          height: label.height + 2
          fill:   fill
          stroke: stroke
        Group
          content: [ back, label ]
      init
        visible = false;
        layoutInfo.managed = false;
    WithTooltip.fx
    public mixin class WithTooltip
      /** The tooltip to display. */
      public var tooltip: Tooltip;
      // We display the tooltip after a while being over the node
      var tooltipTL = Timeline
        keyFrames: KeyFrame
          time: 750ms
          action: function ()
    //~         println("visible {%.0f tooltip.boundsInParent.minX} {%.0f tooltip.boundsInParent.minY}");
            tooltip.visible = true;
      var baseMouseMoved;
      var baseMouseEntered;
      var baseMouseExited;
      postinit
        var tooltipNode = this as Node;
        baseMouseMoved = tooltipNode.onMouseMoved;
        tooltipNode.onMouseMoved = function (evt: MouseEvent): Void
          if (not tooltip.visible)
            tooltip.translateX = evt.sceneX;
            tooltip.translateY = evt.sceneY - 20;
          baseMouseMoved(evt);
        baseMouseEntered = tooltipNode.onMouseEntered;
        tooltipNode.onMouseEntered = function (evt: MouseEvent): Void
    //~       println("onMouseEntered: {%.0f evt.sceneX} {%.0f evt.sceneY}");
          tooltipTL.playFromStart();
          baseMouseEntered(evt);
        baseMouseExited = tooltipNode.onMouseExited;
        tooltipNode.onMouseExited = function (evt: MouseEvent): Void
    //~       println("onMouseExited");
          tooltipTL.stop();
          tooltip.visible = false;
          baseMouseExited(evt);
    SomeStage.fx
    class ImageWithTooltip extends ImageView, WithTooltip
    var earthTT = Tooltip { text: "Mother Earth" }
    var earth = ImageWithTooltip
         image: Image { url: "{__DIR__}earth.png" }
         tooltip: earthTT;
    var mapTT = Tooltip { text: "General map of France" }
    var map = ImageWithTooltip
         image: Image { url: "{__DIR__}map.jpg", width: 200, preserveRatio: true }
         tooltip: mapTT;
    // Put the ImageWithTooltip nodes in layout if needed, put the Tooltip nodes at the end of the scene (on top, out of any layout).

  • I have no idea how to set up a pie chart for tracking spending with categories

    This is what I want to do to help me track my credit card spending.
    I want to make a Numbers sheet where i can jot down how much money i spent on a item, and what category that item would go with (example, food, electronics, gas, so on).
    and then i want to have a pie chart that will show much how much money i'm spending in each category and how much of a percentage of the total each category takes up of the whole.
    I have no idea how to set this up in a sheet. I tried typing it in a few times and every time i go to make a pie chart, it never shows me any of the results i want to see.
    can someone please help me set up a sheet to be able to get this information to display correctly in a pie chart?

    Brad,
    Create a table with the categories and the data (for now you can make up the data):
    Now add a chart from the Charts menu in the toolbar:
    Now click the "Add Chart Data" button just below the chart.
    Now select data (from column B) in the table.  Last trick is to click the menu at the bottom-left corner of the window and change the selection to "Plot rows as series" :
    Now add formulas to the table to properly summarize the data from your data entry table using the sumif() function.

  • How to Get Lines in Pie Charts

    Using CF7 and WebCharts3D, and got my pie chart working. Only
    problem, I can't figure out how to get it to show LINES from the
    label of each pie slice, to the label's corresponding slice. The
    pie slice labels (descriptions) appear outside the pie chart, which
    is where I need them. But when you get a pie chart with a lot of
    slices (say 8 or more) and a lot of smaller slices close together,
    it's hard to tell which label applies to which slice. Hope this
    makes sense.
    All I need is to ADD A SMALL LINE from each label to it's
    corresponding pie slice. I've looked for options in WebCharts3D to
    do this, but can't seem to find anything (in the Decorations,
    Series, etc., sections).
    If this is possible (getting these lines to appear) could
    someone please advise how to do this? Greatly appreciate any
    help/advice. (It's probably something very easy, and I just missed
    it).
    Gary

    I was afraid of that. Just wanted to make sure I wasn't
    missing something. Thanks for the note and for confirming. Much
    appreciated.
    Gary

  • How can I create a Pie charts ?

    HI all,
    I'm a beginner in java and i'm investigate in a web project (website) which should display statistical charts. I did a beans to generate basic bar charts, but it is most difficult to build a Pie chart. That's why i need help to put me on the rigth way to build Pie Charts beans (this pie charts should be filled up with db query).
    Every kind of help will be appreciated.
    Thanks in advance
    Hope someone can help me.
    STF

    I take it you constructed the bar graphs using html and images together?
    Obviously it's a little more difficult to make a pie chart with html. Chances are that it will have to be an image rendered by a Servlet or JSP. I suggest looking at how to create images using AWT or swing. This will allow you to create a circle with different color slices and what not. Then you need a Servlet or JSP that will send the image out the output stream. You can then place an image tag in your html page like this <img src="http://myserver.com/PieChartServlet>
    I'm actually working on an API myself that will render pretty histograms (line graphs), and hopefully pie charts down the road. It's going to be an open source project. I decided to make my own API when I looked at some others out there who were charging an arm and a leg for theirs. Chart Builder for example, it's like $6K for their java based API <choke>.
    So if you're interested, or anyone else is, shoot me an email and I'll let you know when the beta is ready. [email protected]
    -Derek

  • How to add tooltip on dashboard

    Hi all,
    How can I add tooltip on Dashboard (shown in picture)? I have tried this by adding Comment on dashboard while creating it. But It did not show comment just name of dashboard in tootip.
    http://img686.imageshack.us/img686/5295/tooltip.png
    Thanks all

    Hi
    Add description in Description field, of properties for dashboard.
    Regards
    Kishore Guggilla

  • How to add Tooltip to the Iview name.

    hi all,
         I have to add tooltips to the iview name. When I bring the mouse over the iview
         name a message should display as the tooltip describing the purpose of the
         iview I am not able to found the tooltip option in the iview properties.
         Is there any coding involved for tooltips option or any other options available.
         Please guide me. Looking for the fast reply.
         Thanks in advance.
    Ponnusamy.P

    hi Deepti,
         When I gave the descripition, tool tip appears in the
         Content Admin -> Portal Content -> (Under the folder I have created the Iview).
         But the tool tips should appear in the iview when I display that iview to the end
         user.How to make that possible.
    Thanks
    Ponnusamy P

  • How to draw a simple pie chart?

    I want to draw a simple pie chart.
    I was wondering whether there already exists a method to allow me to do that in SDK 1.4.2. I saw on the net a method getPieChart( ).
    Do you know if its incorporated in SDK1.4.2 and how to draw the pie chart using this method. Can anybody guide me?
    Thanks.

    Have a look in your demos folder in your SDK, for example:
    C:\j2sdk1.4.2_04\demo\applets\GraphicsTest

  • How can i create a pie chart

    Hi all,
    I'm a beginner in java and i'm investigate in a web project (website) which should display statistical charts. I did a beans to generate basic bar charts, but it's most difficult to build a pie chart. That's why i need help to put me on the right way of building a Piechart beans.
    All kind of help will be precious
    Thanks in advance.
    STF

    Thanks a lot for your reply.
    But it shall works in a beans and this was set up only for applications or applet. Besides it seems (i'm really not sure but i have found lot of thread)that an applet can't be run into a jsp page that is searching data into db (thanks to sql query)
    : there is a problem of buffer (tomcat can't generate the jsp page in the same time as it execute the applet).
    Let me know if i'm wrong or not please ?
    Regards
    STF

  • I am wanting to add an interactive pie chart to a custom form

    The pie chart or "wheel" is a visual for my project status form I want to share with clients. Can this be done? I only see an option to insert an image.
    thanks

    Currently we only support one field/item on a line. We are working on adding a feature that allows you to put multiple fields/items on a single line. We hope to have that out in a few months.
    Randy

  • How to add Oracle Graphics 6i charts (OGD) to my Oracle Reports 10g

    Hi,
    Is there any possibility to add Oracle Graphics 6i Charts (.OGD) to Oracle Reports 10g
    (OR)
    If not possible, Can you please provide steps to migrate OGD to any format that is supported in Oracle Reports 10g.
    Regards,
    Swethan

    Oracle Graphics and its OGD image format are no longer supported. Reports built with previous versions of Oracle Reports containing Oracle Graphics charts will continue to run in Oracle Reports 10g Release 2 (10.1.2) if the Oracle Graphics 6i runtime is installed on the same machine in a separate ORACLE_HOME. However, this is not a supported configuration, and Oracle will not fix bugs that result from this configuration.
    Re-create all Oracle Graphics 6i objects using the Graph Wizard

  • How to add tooltip to jframe title?

    hi all
    does anyone knows how can i set tooltip for jframe title?
    thanks

    Since it's a slow Saturday and I'm in a good mood...import darrylbu.util.SwingUtils;
    import javax.swing.*;
    public class FrameTitleToolTip {
       public static void main(String[] args) {
          JFrame.setDefaultLookAndFeelDecorated(true);
          SwingUtilities.invokeLater(new Runnable() {
             @Override
             public void run() {
                new FrameTitleToolTip().makeUI();
       public void makeUI() {
          JFrame frame = new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(400, 400);
          for (JComponent component : SwingUtils.getDescendantsOfType(JComponent.class,
                frame)) {
             if (component.getClass().getName().contains("MetalTitlePane")) {
                component.setToolTipText("Tooltip for frame title bar");
                break;
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
    }You can get the SwingUtils class [_here_|http://tips4java.wordpress.com/2008/11/13/swing-utils/]
    db

  • 3D pie chart in a report

    Hi all,
    I need to add a 3D pie chart in a report, and I don´t find it in the Chart Wizard. Anyone knows if is it possible to do this?
    Thanks in advance.

    Hello,
    http://www.oracle.com/technology/products/reports/htdocs/faq/Graph_FAQ_with_style.html
    How do I apply 3-D (three-dimensional) effect to my graphs?
    For Pie graph type, add the following attributes to your Graph.xml:
    <Graph ... pieDepth="30" pieTilt="20" ... >
    Regards

  • 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);
    }

Maybe you are looking for

  • Schedule line items facility in PS

    Hi friends, There is the Schedule lines functionality in Sales Order. This is used for planning the despatch schedules date wise. Now I am attaching a Finished Goods BOM to an activity in a Project, say of 50 quantity. Is there any standard functiona

  • Can not install Acrobat XI pro in CC

    For some reason I have got the anouncement that my Acrobat pro was a trial version. But I thought in CC it is not a trial version but a full version? So I tried to uninstall this version in Utilities, and hoped that I could download Acrobat again. Bu

  • BRS ERROR

    while running brs for various banks automatically paise differences are updating in one particular bank main & oug going gl accounts. tell me where the assignment is wrong and solution needed

  • Windows cannot connect to printer. 0x00...2

    I work in a Domain environment where we have hundreds of printers on about a Dozen Print Servers. Some are 2003 and others are 2008. The Server I'm working with is 2003. The client work stations are Windows 7. We have several printers not mapping to

  • Returncode of Transporting a change request

    Dear developers, do you know how to check the returncode when transporting a change request to test or productive system. In my case I have the special problem that change requests will be transported in an async way so that the developer could not c