Bar graph legend problem

Hi I am using JDeveloper Studio Edition Version 11.1.1.3.0.
My problem is that I have made a bar graph inside an af:showDetailItem but the legends isn´t shown correct. I can´t see the legends at all when I place the legends in the bottom and if I place them in the right I can see half of the text. The source code is below. If someone can see something wrong in this code don´t hesitate to point it out or if someone know how to get this to work please let me know. To me it looks like a bug but I could be wrong.
<af:showDetailItem text="Søgulig gongd" id="sdi8"
stretchChildren="first">
<dvt:barGraph id="barGraph1"
value="#{bindings.TrxBrw360JLHistoryGraphRO1.graphModel}"
subType="BAR_VERT_STACK"
partialTriggers="::pc1:t1"
dynamicResize="DYNAMIC_SIZE">
<dvt:background>
<dvt:specialEffects/>
</dvt:background>
<dvt:graphPlotArea/>
<dvt:seriesSet>
<dvt:series/>
</dvt:seriesSet>
<dvt:o1Axis/>
<dvt:y1Axis/>
<dvt:legendArea automaticPlacement="AP_NEVER"
position="LAP_BOTTOM"/>
<dvt:o1Title id="o1Title1" text="Tíðarskeið"/>
<dvt:y1Title id="y1Title1" text="Upphædd"/>
</dvt:barGraph>
</af:showDetailItem>

Hi,
I stumpled accross this thread and fear I will hit the same problem with a new customer request.
Has a bug been filled for this?
Could not find anything relevant in metalink.
regards
Peter

Similar Messages

  • Graph Legend problem

    Hi all.
    I am using Studio Edition Version 11.1.1.0.1 and got some problems with graph legend. I have a Pie chart and a bar graph which are made from the same read only view object and I can´t understand why the legend on them don´t show the same things when they are made from the same view object. The pie has a status attribute choosen as slices and the bar graph has the same status attribute choosen as bars and it is these things I thought decide what names are shown in the legend. The values for the status are shown in the legend names but the pie shows the legend names in the same order as the query in the view object while the the bar graph show them in the opposite order. How can I make them show the legend names in the same order?
    Atlantic Viking

    Hi,
    I stumpled accross this thread and fear I will hit the same problem with a new customer request.
    Has a bug been filled for this?
    Could not find anything relevant in metalink.
    regards
    Peter

  • Scroll bar on legend for xy graph

    Is there a way to create a scroll bar for the legend of an XY graph?  The number of entries in the legend will be changing programmatically so the legend needs to be able to grow dynamically (which I have figured out how to do using property nodes).  Any ideas?
    Cheers
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

    Ultimately I will have 6 xy graphs in my vi, I would like to have a seperate scroll bar for the legend of each graph.  Each graphs legend will both grow and shrink as the program runs and I would like to use the scroll bar to keep the legend from growing off of the screen.  I would like to be able to dislpay the data from the point (6 m/s for example) along with its symbol on the xy graph (red dot for example) in the legend.  If I am umderstanding you correctly I need to bundle the type and color of the plot into a cluster with the data and then link that cluster to the scroll bar, I assume I can read the property node for each data point (setting it to active plot first) for both plot style and color?  Let me know if I am thinking about this correctly or if I have misinterpreted what you are saying.  Thank you very much for your help!
    Cheers!
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • Problem with Bar Graph

    Hi Experts,
    i am using obiee 11g and i build a report using bar graph view.
    here problem is in horizontal axis some of my values are missing alternative values are only showing in.
    Bars are showing but labels for that corresponding bars are not displaying .
    pls help me

    Increase the width of the graph something 1000 or so.

  • Problem with bar graphs in Crystal Report

    Hi All,
    I am currently working on bar graphs and i am facing problem displaying trend in the graph when there is no data for any particular date.
    My X-axis has date and y-axis has data.
    I want to display all the dates on x-Axis which is selected by the user.
    E.g.  User has selected fromDate and ToDate as 1st Aug to 10th Aug and I have Data as follows
    08/01/2008 abc
    08/03/2008 xyz
    08/05/2008 klm
    Currently my graph just shows data for 1st,3rd and 5th of August.
    I want my Graph to show all the dates from 1stAug to 10thAug on x-axis and it should not only show  data where it is but also a blank where data is not present
    Please help. Thank you.

    Hi Tenzin
    Following are the steps from where you can change the division of the axes:
    Right click on the report.
    Go to 'Chart Expert' -> 'Axes' tab.
    Select the Manual option under 'Number of divisions'.
    Change the settings so that you can get each date on the axis.
    Hope this helps you.
    Please let us know if you have any further queries.
    Regards
    Ashwini Yadav

  • Sort legend area in stacked bar graph

    Hi!
    Is it possible to sort the legend area in a stacked bar graph?
    Br
    Casper

    In the chart data editor, click and drag one of the the rows to change the ordering:

  • A bar graph problem

    hi all,
    sorry if my question is not clear, try my best to describe.
    i currently creating a bar graph applet, where this applet take different "group" of data / value, e.g. (68, 268,2680, 28 and 8). and here the maximum value is 2680, other group may NOT so. so for being the bar graph display, i have an applet that has a "fixed" maximum width of 700, i need my bar graph to have only 10 columns and also i need to minus out 10 from each column for other purposes, so i take (700 / 10) - 10 = 60, but here come the real problem, if i take 268 * 60 = 16080, that is incorrect! That is i know that i had to divide the 700 with 1000, because (700 / 1000) - (10 / 1000) = 0.69, then 268 * 0.69 = 184.92, that seem OK! but, but it still ran out of the expected result, the bar width will be much more shorter than expected (only those higher data value), why? my code will be as follow:
       if (highestWidth >= 1001)
          maxDetector = 10000;
       else if (highestWidth >= 101)
           maxDetector = 1000;
       else if (highestWidth >= 11)
           maxDetector = 100;
       else
           maxDetector = 10;
       maxSingleWidth = (axisPanel.getWidth() / maxDetector) - (10 / (maxDetector / 10));so, at for loop:
    for (i=0; i <= 9; i++){
       barPanel.setBounds(x, y, (dataValue * maxSingleWidth), height);
    any help will be very very much appreciated!!!

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    public class BarGraph
        public BarGraph()
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(new BarGraphPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
        public static void main(String[] args)
            new BarGraph();
    class BarGraphPanel extends JPanel
        int[] data;
        int maxValue;
        Font font;
        NumberFormat nf;
        final int PAD = 40;
        public BarGraphPanel()
            data = new int[] { 75, 12, 23, 44, 98, 32, 53, 6 };
            font = new Font("lucida sans demibold", Font.PLAIN, 15);  // j2se 1.3+
            nf = NumberFormat.getNumberInstance();
            nf.setMaximumFractionDigits(1);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            double w = getWidth();
            double h = getHeight();
            // ordinate
            g2.draw(new Line2D.Double(PAD, PAD, PAD, h - PAD));
            // ordinate labels
            String[] labels = getLabels();
            float labelScale = (float)(h - 2*PAD)/(labels.length - 1);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            for(int j = 0; j < labels.length; j++)
                float width = (float)font.getStringBounds(labels[j], frc).getWidth();
                float height = font.getLineMetrics(labels[j], frc).getAscent();
                float x = (PAD - width)/2;
                float y = (float)(PAD + j*labelScale + height/2);
                g2.drawString(labels[j], x, y);
            // abcissa
            g2.draw(new Line2D.Double(PAD, h - PAD, w - PAD, h - PAD));
            // plot data
            g2.setPaint(Color.red);
            double xInc = (w - 2*PAD) / data.length;
            double yScale = getValueScale(h);
            double x1, y1, x2, y2;
            for(int j = 0; j < data.length; j++)
                x1 = PAD + j * xInc;
                y1 = h - PAD;
                x2 = x1 + xInc;
                y2 = y1 - data[j] * yScale;
                g2.draw(new Line2D.Double(x1, y1, x1, y2));    // left vertical
                g2.draw(new Line2D.Double(x1, y2, x2, y2));    // top of bar
                g2.draw(new Line2D.Double(x2, y2, x2, y1));    // right vertical
        private double getValueScale(double h)
            int max = getMaxValue();
            return (h - 2*PAD) / max;
        private int getMaxValue()
            int max = Integer.MIN_VALUE;
            for(int j = 0; j < data.length; j++)
                if(data[j] > max)
                    max = data[j];
            return max;
        private String[] getLabels()
            int max = getMaxValue();
            double inc = max/3d;
            double next = max;
            String[] s = new String[4];
            for(int j = 0; j < 4; j++)
                s[j] = nf.format(next - j * inc);
            return s;
    }

  • Legends on any bar graph

    Hi
    Please guide/ suggest how to get legends permanently displayed on the any bar graphs in the SOD Analytics dashboard. As of now the legends are visible only when the curser is on that bar.
    regards
    NSC

    It's not clear if you are referring to Values or Legend, so I'll address both. You can find the options mentioned below in the chart Edit View (same applies for Pivot Table charts).
    By default, the value of a bar will appear when you roll your mouse over it. If you want the value to appear permanently, then click the "Chart Properties" (pointy finger icon) and choose "Show Data Labels: Always".
    Some chart types will not, by default, show a legend (indicating what each color stands for). To show a legend, you click on "Additional Charting Options" (arrow pointing right icon), choose the "Legend" tab and select the location for the legend to appear.

  • OBIEE 11g - Line-Bar Graph problem

    Hi,
    I am trying to build a Line-Bar graph where the line represents target. My data is as follows:
    Dim1 Dim2 Fact Target
    A Z 10 2
    A Y 5 2
    B X 6 3
    B W 7 3
    Please note that, the target is same across same Dim1. Like A has same target, B has same target.
    Now if I create a stack chart with stack based on Dim2 (Dim2 is in the Vary by Colour), then I get mutiple line for target with the same value for each Dim1.
    I am not sure if I could explain it clearly.
    I want to show one line for the target since its same for Dim1. How can I do that?
    Please help.
    My chart config is as follows:
    Group By (Dim1)
    Vary Coulor by (Dim2)
    Bars (Fact)
    Lines (Target)

    Not yet, and I've been too busy with some SEV 1 issues to goof around with it. I also need to open a ticket about default pivot table formatting - i.e. removing the background colors under the non-data areas, and they also seem to have some sort of gradient fill at the bottom. I'll let you know if I hear anything.
    Thx,
    Scott

  • Using the report generation toolkit, how do I make a bar graph verticle instead of horizontle?

    The attached vi is similar to what I am using, and it produces an Excel bar chart. I would really like to create the same chart, only vertically instead of horizontly. I have tried all kinds of things that don't work. Is there a way to do this that does work. I want a result similar to rotating the produced chart 90 degrees CCW.
    Thank you!
    Attachments:
    Chart Test.vi ‏20 KB

    you want to use a xy-graph.
    you can right click the plot legend to make a bar graph vertical.
    Harold Timmis
    [email protected]
    Orlando,Fl
    *Kudos always welcome
    Attachments:
    bargraph2.jpg ‏91 KB

  • How to get bar graph in word in labwindow/CVI ?

    how to get bar graph in word in labwindow/CVI ?

    ashwinic9,
    spawning your question over more and more threads (the present one, this one and this other one) won't give you a faster answer; instead, it will irritate forum users! 
    Especially if you have at your disposal a fast way to perform a test. I pointed you some days ago to word report example, that writes a table to a word document: did you tried changing the graph into a bar graph and generating the report? I have done it for you and the result is OK, as you can see in the attached document.
    Now, since the example works well, there must be something in your particular situation that prevents the graph to be shown; that is: you must add some more data on your actual problem and maybe a small example that exposes the problem.
    But please: keep active only this discussion and let the other threads die! 
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?
    Attachments:
    wordreport.doc ‏38 KB

  • GRAPH LEGEND LABELS NEED TO BE USER MODIFIABLE

    GRAPH LEGEND LABELS NEED TO BE USER MODIFIABLE FOR DYNAMIC PARAM INPUT CONTROL
    I've been told on Metalink that my problem can not be resolved in Reports 9i or 10G but a Internal enhancement request 3071917 has been logged.
    Is it possible to have some timescales on this limitation?

    I'd suggest that the easiest approach would be to add a trigger to the table:
    CREATE OR REPLACE TRIGGER trigger_name
    BEFORE UPDATE OF comment_txt ON table_name
    FOR EACH ROW
    BEGIN
      :new.last_updated_by := USER;
      :new.last_update_date := SYSDATE;
    END;This trigger will only fire when the COMMENT_TXT field is being updated and will set the LAST_UPDATE... values accordingly. The only downside to this approach would be if you want to store the OBI user and not the DB user. Effectively, you'd need to pass a parameter from OBI to the trigger to use instead of USER - bit more tricky...
    Going back to your suggested approach, I don't think you need to worry about the RPD; the SQL that you define in the XML will bypass the RPD completely. In terms of what to use for the criteria for the report, you should be able to select the OBI user from a session variable and reference SYSDATE, SYSTIMESTAMP or the OBI equivalent to get what you need.
    Edited by: BarryGoodsell on Sep 26, 2012 12:04 PM
    Added code tags

  • Illustrator Graph Legends change location on refresh

    I have just upgraded from Illustrator 10 to Illustrator CS4. I have thousands of repeating graphs we use for production of newsletters, books, etc. With Illustrator 10, I would use the Group Selection tool to move a graph's legend and text to the position I wanted them, and they stayed put every time I edited the data.  Now, after importing into CS4, I'm discovering that although the graph parts of the legend stay put (lines, squares of color for columns), my text for the legends moves with every refresh. This is a major problem for me, since we can't be moving these manually over and over every time I add data to a graph or make changes.
    I knew the text is handled very differently between 10 and CS4, so I tested recreating some of my most used graphs from scratch in CS4 to see if this would solve the problem. It's actually worse; the text moves position far to the right or to the top, depending on whether Add Legend Across Top is selected or not. I never use legends in either of these spots, we always put them inside the graph, or outside on the bottom.
    I think I must be missing something in now to update these graphs in CS4 to keep the legend text from jumping all over the place. Please tell me I'm missing something!

    OK, no answers to my specific question as of yet. So  can I just ask if those of you who use the Graph tool fairly frequently can answer this. Once you create a graph, do you move the legend? And if you do reposition the legend manually in a custom position (not top or left in the default position), and then update the data with changes, additions, etc., do the graph legends stick for you, or do they move?

  • Simple Bar Graph

    What I'm trying to do is make a simple bar graph, with multiple bars of different colors and do this using an array. I create a new bar, set its size and color, and then create another bar, set its size, color and i've also moved it over 10 pixels so its not ontop of the original bar. And I'm using an array for the ractangle shap, and fillrect to fill it.
    My problem comes when I add the object to the pane ( frame.getContentPane().add(blue); )
    It only adds the last one, it doesn't add the blue bar. does getContentPane repaint the screen or something, so that the previous one doesn't show? Or am I missing something?
    Thanks for any input,
    Bar Class
    import javax.swing.JPanel;
    import java.awt.*;
    public class Bar extends JPanel
       private int[] xBar = {25, 25, 30, 30};
       private int[] yBar = {350, 100, 100, 350};
         private Color fillColor;
       public Bar()
          setBackground(Color.black);
         public void setSize(int height)
              yBar[1] = height * 10;
              yBar[2] = height * 10;     
         public void changeColor(Color colour)
              fillColor = colour;
         public void moveOver(){
              for(int i = 0; i < xBar.length;i++)
                   xBar= xBar[i] + 10;
         // Draws the bar
    public void paintComponent(Graphics gc)
    super.paintComponent(gc);
    gc.setColor(fillColor);
    gc.fillPolygon(xBar, yBar, xBar.length); // draw bar
    BarChart classimport javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.*;
    public class BarChart
    // Creates the main frame of the program.
    public static void main(String[] args)
    JFrame frame = new JFrame("Bar Chart");
              Bar red = new Bar();
              Bar blue = new Bar();
              red.setSize(9);
              red.changeColor(Color.RED);
              blue.moveOver();
              blue.setSize(5);
              blue.changeColor(Color.BLUE);
    frame.getContentPane().add(blue);
    frame.getContentPane().add(red);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.pack();
    frame.setVisible(true);
              frame.setSize(400,400);

    Ok, I've recreated the whole thing. And it seems to work well, my only problem now is that the graph seems to move on the x-coordinate randomly each time I recompile and run it. Any idea's on why it may do this? I had a friend look at it, and he said it seems to be calling the draw method multiple times, but I cant figure out how, or why it would even do that. So my question is, why is the graph shifting across the screen each time I compile it and run it?
    import javax.swing.JFrame;
    import java.io.*;
    public class BarGraphDriver
         public static void main(String[] args)
              int[] input = {5, 60, 20, 100};//Set height of each bar in the graph (number between 0 and 10
              JFrame frame = new JFrame("Bar Graph");
              BarPanel panel = new BarPanel(input);
          frame.getContentPane().add(panel);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.pack();
          frame.setVisible(true);     
              frame.setSize(600, 450);
    import javax.swing.JPanel;
    import java.awt.*;
    public class BarPanel extends JPanel
         Bar graph;
       //  Sets up the panel characteristics.
       public BarPanel(int[] values)
              JPanel panel = new JPanel();
              panel.setLayout(null);     
              graph = new Bar(values);     
          setBackground(Color.black);
       //  Draws the bar
         public void paintComponent(Graphics gc)
          super.paintComponent(gc);
              graph.draw(gc);
    import javax.swing.JPanel;
    import java.awt.*;
    public class Bar extends JPanel
       private int[] xBar = {10, 10, 60, 60};
       private int[] yBar = {300, 100, 100, 300};
         private int data[];
         private int origData[];
       public Bar( int initVal[] )
              data = new int[initVal.length];
              origData = new int[initVal.length];
              for(int i=0; i<initVal.length; i++)
                   origData[i] = initVal;          
                   data[i] = Math.abs(initVal[i] - 300);
    public void draw(Graphics gc)
              gc.setColor(Color.RED);
              gc.drawLine(10, 301, 600, 301);//horizontal redline
              gc.drawLine(10, 301, 10, 10);//vertical redline
              for(int h = 0; h<data.length; h++)
                   gc.setColor(Color.GRAY);
                   gc.drawLine(10, data[h] + 1, 600, data[h] + 1);//horizontal redline
              for (int i=0; i<data.length; i++) //countes each bar
                   for (int j=0; j<xBar.length; j++)
                        xBar[j] = xBar[j] + 60;          
                   if (data[i] >= 1 || data[i] < yBar.length)
                        for(int k = 1; k < 3; k++){
                             yBar[k] = data[i];
                   gc.setColor(Color.BLUE);
              gc.fillPolygon(xBar, yBar, yBar.length); // draw bar
                   int xText = xBar[0];
                   int yText = data[i] - 10;               
                   gc.setColor(Color.WHITE);
                   gc.drawString(" " + origData[i], xText, yText);     
    Edited by: mark2685 on Oct 31, 2008 12:10 PM
    Edited by: mark2685 on Oct 31, 2008 12:14 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adjust width of bar in bar graph

    Hi,
    I am trying to increase the width of bars in bar graph developed in 10g reports. I found your thread which says please find in my previous posting.
    I could not find. can you please enlighten me on this question
    You help will be truly appreciated.
    Thank you,

    If you are refering to bar plots, you have 3 bar styles (thin, wide but not connected, wide), accessible using the plot.barstyle property node, or directly witha right click on the legend.
    Not sure that this is what you are looking for...
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

Maybe you are looking for