Creating a bar graph...

...two questions, one presumably simple, and the other a bit tricky:
1. The graph is to show 64 points on the X axis. How do I specify the "fatness" of my bars?
2. The boss says he wants every other value colored differently: red-blue-red-blue-red-blue...is there a way to do this?
What I'm actually plotting is 32 complex numbers. He wants the real component in one color, and the imaginary in another. So, 32 points of 2 values each is my 64 points total. 
Thanks for any assistance.
Solved!
Go to Solution.

With reference to the bar thickness, it appears that the graph is a "smart control"  : it adapts bar width to actual data plotted.
Specifically, it appears that thickness is related to number-of-bars / axis-width ratio.
See this picture: the same CVI example with 100 and 10 data points plotted.
(Note: with thick bars you may have to struggle a bit to have the correct X scale shown. In the 10-samples example above, I enabled label strings for the graph X axis, used a scale of -0.5 to 9.5 and created the appropriate labels for integer values)
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?

Similar Messages

  • Programmatically create a bar graph (ADF DVT) at run time...

    Can someone show me how to programmatically create a bar graph (ADF DVT) at run time..
    Thanks in advance.
    Minh

    Hi Briston,
    You can make the column selected by setting "selected" property of column to true
    Sireesha

  • How to create drilldown bar graph using clicklistener

    Hi,
    I have a view object that sums some data and tags each sum accordingly - eg sum salary grouped by department name.
    I display this using a horizontal bar graph.
    I want to now be able to click on a bar and then have the details displayed in a table. I am led to believe from chapter 24 of the manual it is possible to do using no java coding (ie not having to create a bean etc).
    You can use the row selection listener of a graph (which serves as a master view) to enable clicks on a bar, slice, or other graph data element to update the data in another ADF component (which serves as a detail view). For example, a click on a bar that represents sales for a given product in a graph might cause the display of the detailed sales data related to the product in a pivot table.
    The following requirements must be met to achieve this master-detail processing declaratively:
    1. You must use the same tree data control to provide data for both views as follows:
    1. Bind the graph as a row set to one level in the data control.
    HOW ?
    2. Bind the other ADF view (such as a table or pivot table) to a lower level in the tree data control.
    I don't have a nested iterator - is it saying to use a master-detail scenario like dept/emp ?
    2.
    Set a value for the clickListener attribute of the graph tag in the Behavior page of the Property Inspector and use the processClick method that is already part of the graph binding.
    For example, if the value attribute of the graph tag is value="#{bindings.myGraph.graphModel}", then the clickListener attribute should be clickListener="#{bindings.myGraph.graphModel.processClick}".
    3. Ensure that the partialTriggers attribute on the parent tag for the detail component is set correctly. It should be set to the ID of the graph component.
    You do not have to write Java code for handling clicks on data elements in the graph. The processClick event on the graph binding recognizes click events on data component in a graph and performs the necessary processing.
    Are they suggesting all you need to do is ensure you have proper master-detail tables set up and it will automatically work ?
    cheers
    Edited by: Dom Klein on May 27, 2009 8:06 PM

    Hi Frank,
    thanks for replying. I opened a TAR about this as I cannot produce a drilldown table. I created a VO with my summary - eg
    select decode(manager_id, 100, 'fred',
    123, 'bill', 120, 'kate', 121, 'julia', 147, 'ken', 108, 'james', 148, 'liz',
    149, 'phil', 205, 'jack', 102, 'eric', 'dominic') manager_name, sum(salary) as salaries
    from employees
    GROUP BY
    decode(manager_id, 100, 'fred',
    123, 'bill', 120, 'kate', 121, 'julia', 147, 'ken', 108, 'james', 148, 'liz',
    149, 'phil', 205, 'jack', 102, 'eric', 'dominic')
    Then I created a detail view object (from HR.employees) and added a calculated column :
    SELECT Employees.EMPLOYEE_ID,
    Employees.FIRST_NAME,
    Employees.LAST_NAME,
    Employees.EMAIL,
    Employees.PHONE_NUMBER,
    Employees.HIRE_DATE,
    Employees.JOB_ID,
    Employees.SALARY,
    Employees.COMMISSION_PCT,
    Employees.MANAGER_ID,
    Employees.DEPARTMENT_ID,
    decode(manager_id, 100, 'fred',
    123, 'bill', 120, 'kate', 121, 'julia', 147, 'ken', 108, 'james', 148, 'liz',
    149, 'phil', 205, 'jack', 102, 'eric', 'dominic') AS manager_name
    FROM EMPLOYEES Employees
    I create a new viewlink which links on manager_name. When I run the bc4j appmodule I can see the correct master-detail relationship. IF I drag a master-detail table onto the page it works fine.
    Now if I create a graph using the master and then create a table using the detail I can't get it to use this relationship even after setting the processClick() and the id for the graph set on the partial trigger of the table. Any ideas ?
    cheers

  • Is there any way I can create a bar graph in TextEdit?

    I need help completing a science lab due tomorrow. I have to make a bar graph, and I can't figure out how to make one. Any suggestions??

    No, however Numbers easily can.

  • BO 4.0 webi: Conditional formatting on a bar graph

    Hi,
    Is it possible to fiormat a Bar graph conditionally in BO 4.0(SAP BO BI: web intelligence)..
    I want to create a bar graph that displays bar in Green color if the value of bar is greater than target set and Red if it is less than target, which is not doable with BO xi3.1 version.
    Please let me know if this can be doable with latest version of BO 4.0 webi.
    Thanks in advance..

    Hi Bharath,
    One workaround in 3.1 I have found is to use a stacked bar chart and then create two variables out of the measure you want to be green if over a certain amount and make the formula:
    =[Measure Object] Where([Measure Object] >= 10,000)
    and the 2nd variable formula for red:
    =[Measure Object] Where ([Measure Object] <10,000)
    Then place these two measure variables on top of each other where the measure values go. Then go into the color palette and make a custom palette with the first two colors green and red see if that gives you what you are looking for.
    Thanks

  • How to use a single variable in multiple schedules in bar graph

    Hello Experts,
    I am usiing a variable X in different schedules for creating a bar graph.This variable X is used in all schedules with different restrictions.For that reason I have to use X and follow some space after X to use it in another schedule. Is there any method to use X again base on schedule name? For example: If schedule1 then X where key=1000 and if schedule2 then X where key=2000.

    Hi,
    You can create a variable with the same name but use this in a small case...
    All the Best,
    Madhu....

  • 3d bar graph in CVI

    Hi,
      I am trying to determine if there is a 3D Bar Graph capability in CVI.  I see that it is possible to create 3D surface plots and contour plots under the
    AxtiveX libraries but I do not see one for 3D bar graphs.   Is this possible?
    I would like to basically create a 3 dimensional histogram whereby each 3d bar is equally spaced from it's neighbors, not continuous like a surface or mesh plot.
      Thank you,
      Phil Mulhall

    Hello Phil,
    As you mentioned, CVI provides a control for 3D graphs in the CWGraph 3D control. This control does not allow for 3D bar type graphs.
    There is also the OpenGL instrument driver, but that does not seem to be able to create 3D bar graphs either. More information about the ActiveX control can be found here:
    http://digital.ni.com/public.nsf/allkb/C6DD5A699FDD5EA5862570A100719B8E?OpenDocument
    As for a 3D bar graph, I'm not aware of a way to do this. Sorry I could not be more help.
    I'm aware that you have already had this answer via email, I am simply posting it here for other forum users who may have the same question.
    Kind Regards,
    James W
    Controls Systems Engineer
    STFC

  • Remove decimals from the Bar Graph..

    Hii,
    How to remove the Decimals from the Bar Graph.
    I am using Reports 9i.
    I have created a Bar Graph in that It is showing the decimals bar. Actully in the query i hv used the inbuild function Round but while i run the report it is showing the decimals.
    It is showing if the value is under 10 then 3 decimals. Value is between 10 to 100 then 2 decimals. 100 to 1000 is 1 decimal.
    How can i remove the same.
    Also in the X axis how can I put the description of a field. While i take the description fiel it is showing some exception error.
    Description field width is 50 Now I am showing the code field only have 3 digits.
    Please check this also...
    remove decimal places
    Thanks in Advance
    Jithesh

    Hi Simran
    1. You can get proper variable without decimal point.
    2. Use function "FLOOR" and get the output value assigned to variable defined in step 1.
    data : wv_wh_no type p decimals 0 .   -
    you take as per your requirement
    Let say,
    wv_dec_no = 1.0001.
    w_no = FLOOR(wv_dec_no).
    Hope it will help you.
    Regards,
    Anil Salekar

  • Changing the color of bar graph

    I have created a bar graph in graphics builder and I want the
    report to display different colors to indicate different values
    in the field.
    What is the best way to do this?
    Can someone provide me with sample code?
    Thanks

    I have created a bar graph in graphics builder and I want the
    report to display different colors to indicate different values
    in the field.
    What is the best way to do this?
    Can someone provide me with sample code?
    Thanks

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

  • BO XI3.0 - OpenDocument on WebI bar graph

    Hi:
    I'm still learning the tool -
    I have created a bar graph - the requirement is when user clicks on a bar it should open up another report with the value of the bar clicked -
    E.g. bar is for 3 values - X, Y and Z ... if user clicks on Z's bar then it will open another report with Z's data
    I can do this with links and openDocument function - but was wondering if there is a way this can be done from the graph directly without the need for any SDK.
    Any help will be much appreciated
    Thanks

    As far as I know only in XCelsius you can implement this feature using generic functionality.
    Regards,
    Stratos

  • Creating a popup on mouse over in bar graph

    Hi,
    I want to create a popup using mouse over event on bar graph but I didn't find corresponding property in the property inspector. Is it possible to display a popup on mouse over in bar graph?
    At present I am able to create a popup in the backing bean based on click event. I want to align it to the bar in the graph which was clicked. But now, it is being aligned to the bar graph as a whole(like above the graph , below the graph) when I use "RichPopup.PopupHints.HintTypes.HINT_ALIGN_ID, source". Is there a way to align it to the particular bar?
    Any help is greatly appreciated
    Thank you,
    KK

    Hi,
    don't think you can align it to an area within a component. The align id property expects a component reference. Note that mouse over on a bar graph doesn't select the bar, which means that the data in the binding layer is not set to current (just in case that the data in the popup is meant to be dependent)
    Frank

  • How to create static line in line bar graph in obiee 11g?

    Hello,
    I have requirement where user wants to see a line in bar graph.
    Now the line is just static line, we dont have data field available to draw the line in graph.
    is there a way to create a static line in chart and show it in Line bar ombo graph??
    Thanks in advance..

    e.g. i created the static line '10' in fx and now using this column as line in line bar report , but its not displaying the line at measure of '10' in chart.
    Drag the column to measures section of graph (Line - Vertical Axis) to change this static value create an edit box prompt and pass the value to the column using Presentation Variable (as said by Fernando)
    Thanks,
    Saichand

  • How to create a link to Bar Graph......?

    Hi,
    Can any body tell me how to create a link to a bar graph such that on clicking, it should navigate to specified page in the same application or different application.
    I've written the following Region Source for creating link on Graph. Correct if it is wrong.
    function onDynamicaBarGraphClick(e)
    // Read point name
         name=e.data.Name;
    // Read point value
         value=e.data.YValue;
    // You can add onclick even here using the values name and value
    link='f?p=&APP_ID.:4:'||:app_session||'::::::';
    Thanks in Advance....
    Regards,
    Manoj
    Edited by: user12873839 on Apr 12, 2010 12:11 AM

    I have replied to you in another post. Help Needed : Changing the Color of Bar Graph Dynamically
    Please don't open multiple posts for the same question. Thanks.
    --Manish                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to create stacked bar and standard bar on same graph

    Can OBIEE can both Stacked and Standard bar graph on the same analysis by using Line-Bar graph type? For example, I have four measure: Target revenue, Revenue, Billed Quantity, and Target Quantity. I would like to create an analysis that includes all these four measure. On the same graph, I would like to use Stacked subtype for Target revenue and Revenue, use standard subtype for Billed quantity and use line for Target quantity. I tried, but could not find any way to put stacked subtype and standard subtype on the same graph. Do you know if this feature is available from OBIEE?

    I tried to do this and was a bit successful. I used the paint catalog. Created a a request with 6 columns assuming units and dollars be stacked and Year ago units to be a line:
    Brand Units Dollars 0 Year_Ago_units 1
    Added a new request (Combined with similar request and selected paint subject area): Now in this request my columns are:
    Brand 0 0 Year_Ago_Dollars Year_Ago_units 2
    Assuming Year_Ago_Dollars be standard in your case.
    Created a chart view with brand and 1 on x axis and Units, Dollars, Year_Ago_Dollars on y axis and line as Year_Ago_units.
    Now able to see what I am expecting. May be you need to tweak a bit more according to your requirement.
    Let me know if this is of any help!
    Thanks.
    Edited by: Venkata on Sep 30, 2010 12:11 PM

Maybe you are looking for

  • Proforma Invoice in Stock transfer Intra company

    Hi Gurus, I am trying to make Proforma Invoice in STO Intra company. But it is giving the errror "Not relevant for billing". Actually i want to create a excise Invoice from this Pro forma Invoice. I have also maintained NLN item category in Copy cont

  • TS1367 Where is the power button on an iMac

    Screen is asleep. I hear computer running but can't get screen to come on. Where is power button?

  • PD - Qualifications - Development Plan - Appraisal - Events

    Hi I am reading and studying up about Personell Development. I have a good overview of what SAP HR has to offer for these different areas. However I would like to get practical input on how it is actually already being implemented. Here is how I unde

  • Write-behind max speed?

    Hi, We are trying to test the speed of the write behind mechanism and we would be interested to know how other coherence users handle, for example, writing 1 million rows into the database. At the moment, using jdbc batch inserts we can write approxi

  • I purchased audio books from itunes and it does not sync to my ipod classic

    After trying to sync a bunch of times I unchecked the sync books under my device and now its not there to check again; How do I get that back also?